﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<?application progid="SMath Studio Desktop" version="0.99.6884.37264"?>
<worksheet xmlns="http://smath.info/schemas/worksheet/1.0">
  <settings dpi="96">
    <identity>
      <id>6f15d306-7b44-41c9-a9c3-2dc43f19cefc</id>
      <revision>6</revision>
    </identity>
    <calculation>
      <precision>4</precision>
      <exponentialThreshold>5</exponentialThreshold>
      <trailingZeros>false</trailingZeros>
      <significantDigitsMode>false</significantDigitsMode>
      <roundingMode>0</roundingMode>
      <fractions>decimal</fractions>
    </calculation>
    <pageModel active="true" viewMode="0" printGrid="false" printAreas="true" simpleEqualsOnly="false" printBackgroundImages="true">
      <paper id="9" orientation="Portrait" width="827" height="1169" />
      <margins left="39" right="39" top="49" bottom="49" />
      <header alignment="Center" color="#a9a9a9">&amp;[DATE] &amp;[TIME] - &amp;[FILENAME]</header>
      <footer alignment="Center" color="#a9a9a9">&amp;[PAGENUM] / &amp;[COUNT]</footer>
      <backgrounds />
    </pageModel>
    <dependencies>
      <assembly name="SMath Studio Desktop" version="0.99.6884.37264" guid="a37cba83-b69c-4c71-9992-55ff666763bd" />
      <assembly name="Math Region" version="0.99.6884.37264" guid="02f1ab51-215b-466e-a74d-5d8b1cf85e8d" />
      <assembly name="SpecialFunctions" version="1.12.6884.37264" guid="2814e667-4e12-48b1-8d51-194e480eabc5" />
      <assembly name="TextRegion" version="1.11.6884.37264" guid="485d28c5-349a-48b6-93be-12a35a1c1e39" />
    </dependencies>
  </settings>
  <regions type="content">
    <region id="0" left="72" top="18" width="70" height="40" color="#000000" bgColor="#ffffff" fontSize="10">
      <text lang="eng">
        <p>Test vectors</p>
      </text>
    </region>
    <region id="1" left="198" top="18" width="114" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">n</e>
          <e type="operand">1</e>
          <e type="operand">10000</e>
          <e type="function" args="2">range</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="2" left="351" top="18" width="117" height="52" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">A</e>
          <e type="operand">n</e>
          <e type="function" args="2">el</e>
          <e type="operand">1</e>
          <e type="operator" args="1">-</e>
          <e type="bracket">(</e>
          <e type="operand">n</e>
          <e type="operand">1</e>
          <e type="operator" args="2">+</e>
          <e type="operator" args="2">^</e>
          <e type="operand">n</e>
          <e type="operator" args="2">/</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="3" left="198" top="72" width="87" height="47" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">v</e>
          <e type="operand">e</e>
          <e type="operand">π</e>
          <e type="operand">2</e>
          <e type="function" args="1">sqrt</e>
          <e type="operand">i</e>
          <e type="operand">2</e>
          <e type="operand">2</e>
          <e type="function" args="6">mat</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="4" left="351" top="72" width="187" height="63" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">B</e>
          <e type="operand">n</e>
          <e type="function" args="2">el</e>
          <e type="operand">10</e>
          <e type="operand">9</e>
          <e type="operator" args="2">^</e>
          <e type="function" args="1">random</e>
          <e type="operand">10</e>
          <e type="operand">9</e>
          <e type="operator" args="2">^</e>
          <e type="operator" args="2">/</e>
          <e type="function" args="1">eval</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="5" left="198" top="153" width="168" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
      <text lang="eng">
        <p bold="true">Symbolic Evaluation</p>
      </text>
    </region>
    <region id="6" left="396" top="153" width="61" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
      <text lang="eng">
        <p bold="true">Timing</p>
      </text>
    </region>
    <region id="7" left="558" top="153" width="160" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
      <text lang="eng">
        <p bold="true">Numeric evaluation</p>
      </text>
    </region>
    <region id="8" left="63" top="198" width="82" height="40" color="#000000" bgColor="#ffffff" fontSize="10">
      <text lang="eng">
        <p>Original sum</p>
      </text>
    </region>
    <region id="9" left="198" top="198" width="344" height="41" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">v</e>
          <e type="function" args="1">sum</e>
        </input>
        <result action="symbolic">
          <e type="operand">50000000000000</e>
          <e type="operand">i</e>
          <e type="operator" args="2">*</e>
          <e type="operand">363704402221097</e>
          <e type="operator" args="2">+</e>
          <e type="operand">50000000000000</e>
          <e type="operator" args="2">/</e>
        </result>
      </math>
    </region>
    <region id="10" left="558" top="198" width="148" height="38" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">v</e>
          <e type="function" args="1">sum</e>
        </input>
        <result action="numeric">
          <e type="operand">7.2741</e>
          <e type="operand">i</e>
          <e type="operator" args="2">+</e>
        </result>
      </math>
    </region>
    <region id="11" left="198" top="261" width="99" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">to</e>
          <e type="operand">0</e>
          <e type="function" args="1">time</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="12" left="324" top="261" width="235" height="41" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">2</e>
          <e type="function" args="1">ln</e>
          <e type="operand">A</e>
          <e type="function" args="1">sum</e>
          <e type="bracket">(</e>
          <e type="operator" args="2">-</e>
        </input>
        <result action="numeric">
          <e type="operand">4.9997</e>
          <e type="operand">10</e>
          <e type="operand">5</e>
          <e type="operator" args="1">-</e>
          <e type="operator" args="2">^</e>
          <e type="operator" args="2">*</e>
        </result>
      </math>
    </region>
    <region id="13" left="558" top="261" width="175" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">0</e>
          <e type="function" args="1">time</e>
          <e type="operand">to</e>
          <e type="operator" args="2">-</e>
        </input>
        <result action="numeric">
          <e type="operand">0.216</e>
          <e type="operand" style="unit">s</e>
          <e type="operator" args="2">*</e>
        </result>
      </math>
    </region>
    <region id="14" left="198" top="315" width="99" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">to</e>
          <e type="operand">0</e>
          <e type="function" args="1">time</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="15" left="369" top="315" width="148" height="38" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">B</e>
          <e type="function" args="1">sum</e>
        </input>
        <result action="numeric">
          <e type="operand">4910.2341</e>
        </result>
      </math>
    </region>
    <region id="16" left="558" top="315" width="175" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">0</e>
          <e type="function" args="1">time</e>
          <e type="operand">to</e>
          <e type="operator" args="2">-</e>
        </input>
        <result action="numeric">
          <e type="operand">0.547</e>
          <e type="operand" style="unit">s</e>
          <e type="operator" args="2">*</e>
        </result>
      </math>
    </region>
    <region id="17" left="54" top="387" width="115" height="40" color="#000000" bgColor="#ffffff" fontSize="10">
      <text lang="eng">
        <p>Well defined sum</p>
      </text>
    </region>
    <region id="18" left="198" top="387" width="390" height="49" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">x</e>
          <e type="function" args="1">sum</e>
          <e type="operand">x</e>
          <e type="operand">1</e>
          <e type="operand">x</e>
          <e type="function" args="1">length</e>
          <e type="function" args="2">range</e>
          <e type="function" args="2">el</e>
          <e type="operand">1</e>
          <e type="operand">x</e>
          <e type="function" args="1">length</e>
          <e type="operand">1</e>
          <e type="function" args="2">matrix</e>
          <e type="operator" args="2">+</e>
          <e type="bracket">(</e>
          <e type="operator" args="2">*</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">line</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="19" left="198" top="459" width="170" height="38" color="#800000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">v</e>
          <e type="function" args="1">sum</e>
        </input>
        <result action="symbolic">
          <e type="operand">e</e>
          <e type="operand">π</e>
          <e type="operator" args="2">+</e>
          <e type="operand">2</e>
          <e type="function" args="1">sqrt</e>
          <e type="operator" args="2">+</e>
          <e type="operand">i</e>
          <e type="operator" args="2">+</e>
        </result>
      </math>
    </region>
    <region id="20" left="558" top="459" width="148" height="38" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">v</e>
          <e type="function" args="1">sum</e>
        </input>
        <result action="numeric">
          <e type="operand">7.2741</e>
          <e type="operand">i</e>
          <e type="operator" args="2">+</e>
        </result>
      </math>
    </region>
    <region id="21" left="198" top="522" width="99" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">to</e>
          <e type="operand">0</e>
          <e type="function" args="1">time</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="22" left="324" top="522" width="235" height="41" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">2</e>
          <e type="function" args="1">ln</e>
          <e type="operand">A</e>
          <e type="function" args="1">sum</e>
          <e type="bracket">(</e>
          <e type="operator" args="2">-</e>
        </input>
        <result action="numeric">
          <e type="operand">4.9997</e>
          <e type="operand">10</e>
          <e type="operand">5</e>
          <e type="operator" args="1">-</e>
          <e type="operator" args="2">^</e>
          <e type="operator" args="2">*</e>
        </result>
      </math>
    </region>
    <region id="23" left="558" top="522" width="175" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">0</e>
          <e type="function" args="1">time</e>
          <e type="operand">to</e>
          <e type="operator" args="2">-</e>
        </input>
        <result action="numeric">
          <e type="operand">0.453</e>
          <e type="operand" style="unit">s</e>
          <e type="operator" args="2">*</e>
        </result>
      </math>
    </region>
    <region id="24" left="198" top="576" width="99" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">to</e>
          <e type="operand">0</e>
          <e type="function" args="1">time</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="25" left="369" top="576" width="148" height="38" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">B</e>
          <e type="function" args="1">sum</e>
        </input>
        <result action="numeric">
          <e type="operand">4910.2341</e>
        </result>
      </math>
    </region>
    <region id="26" left="558" top="576" width="175" height="26" border="true" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">0</e>
          <e type="function" args="1">time</e>
          <e type="operand">to</e>
          <e type="operator" args="2">-</e>
        </input>
        <result action="numeric">
          <e type="operand">0.459</e>
          <e type="operand" style="unit">s</e>
          <e type="operator" args="2">*</e>
        </result>
      </math>
    </region>
    <region id="27" left="54" top="657" width="107" height="40" color="#000000" bgColor="#ffffff" fontSize="10">
      <text lang="eng">
        <p>Bad defined sum</p>
      </text>
    </region>
    <region id="28" left="198" top="657" width="438" height="51" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">x</e>
          <e type="function" args="1">sum</e>
          <e type="operand">x</e>
          <e type="operand">1</e>
          <e type="operand">x</e>
          <e type="function" args="1">length</e>
          <e type="function" args="2">range</e>
          <e type="function" args="2">el</e>
          <e type="operand">1</e>
          <e type="operand">x</e>
          <e type="function" args="1">length</e>
          <e type="operand">1</e>
          <e type="function" args="2">matrix</e>
          <e type="operator" args="2">+</e>
          <e type="bracket">(</e>
          <e type="operator" args="2">*</e>
          <e type="function" args="1">eval</e>
          <e type="operand">1</e>
          <e type="operand">1</e>
          <e type="function" args="3">line</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="29" left="198" top="738" width="344" height="41" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">v</e>
          <e type="function" args="1">sum</e>
        </input>
        <result action="symbolic">
          <e type="operand">50000000000000</e>
          <e type="operand">i</e>
          <e type="operator" args="2">*</e>
          <e type="operand">363704402221097</e>
          <e type="operator" args="2">+</e>
          <e type="operand">50000000000000</e>
          <e type="operator" args="2">/</e>
        </result>
      </math>
    </region>
    <region id="30" left="558" top="738" width="148" height="38" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">v</e>
          <e type="function" args="1">sum</e>
        </input>
        <result action="numeric">
          <e type="operand">7.2741</e>
          <e type="operand">i</e>
          <e type="operator" args="2">+</e>
        </result>
      </math>
    </region>
    <region id="31" left="198" top="801" width="99" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">to</e>
          <e type="operand">0</e>
          <e type="function" args="1">time</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="32" left="324" top="801" width="235" height="41" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">2</e>
          <e type="function" args="1">ln</e>
          <e type="operand">A</e>
          <e type="function" args="1">sum</e>
          <e type="bracket">(</e>
          <e type="operator" args="2">-</e>
        </input>
        <result action="numeric">
          <e type="operand">4.9997</e>
          <e type="operand">10</e>
          <e type="operand">5</e>
          <e type="operator" args="1">-</e>
          <e type="operator" args="2">^</e>
          <e type="operator" args="2">*</e>
        </result>
      </math>
    </region>
    <region id="33" left="558" top="801" width="175" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">0</e>
          <e type="function" args="1">time</e>
          <e type="operand">to</e>
          <e type="operator" args="2">-</e>
        </input>
        <result action="numeric">
          <e type="operand">0.404</e>
          <e type="operand" style="unit">s</e>
          <e type="operator" args="2">*</e>
        </result>
      </math>
    </region>
    <region id="34" left="198" top="855" width="99" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">to</e>
          <e type="operand">0</e>
          <e type="function" args="1">time</e>
          <e type="operator" args="2">:</e>
        </input>
      </math>
    </region>
    <region id="35" left="369" top="855" width="148" height="38" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">B</e>
          <e type="function" args="1">sum</e>
        </input>
        <result action="numeric">
          <e type="operand">4910.2341</e>
        </result>
      </math>
    </region>
    <region id="36" left="558" top="855" width="175" height="26" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">0</e>
          <e type="function" args="1">time</e>
          <e type="operand">to</e>
          <e type="operator" args="2">-</e>
        </input>
        <result action="numeric">
          <e type="operand">0.526</e>
          <e type="operand" style="unit">s</e>
          <e type="operator" args="2">*</e>
        </result>
      </math>
    </region>
    <region id="37" left="63" top="909" width="103" height="40" color="#000000" bgColor="#ffffff" fontSize="10">
      <text lang="eng">
        <p>My Conclusions</p>
      </text>
    </region>
    <region id="38" left="198" top="909" width="510" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
      <text lang="eng">
        <p>1. I expect the result painted in red as the value for sum(v)</p>
      </text>
    </region>
    <region id="39" left="198" top="945" width="515" height="40" color="#000000" bgColor="#ffffff" fontSize="10">
      <text lang="eng">
        <p>2. Eval not always reduce the time, like the time marked with border</p>
      </text>
    </region>
    <region id="40" left="198" top="990" width="538" height="40" color="#000000" bgColor="#ffffff" fontSize="10">
      <text lang="eng">
        <p>3. SMath sum have an unnecesary eval: it's result is the same as the bad defined sum.</p>
      </text>
    </region>
    <region id="41" left="63" top="1026" width="58" height="24" color="#000000" bgColor="#ffffff" fontSize="10">
      <math>
        <input>
          <e type="operand">Alvaro</e>
        </input>
      </math>
    </region>
  </regions>
</worksheet>