You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p><code>ISNA()</code> differs from some spreadsheet programs for certain expressions, such as divisions by zero. <em>TinyExpr++</em> will return true for this situation, while <em>Excel</em> will return false. This is because <em>Excel</em> distinguishes between <code>#DIV/0!</code> and <code>#N/A</code> errors, while <em>TinyExpr++</em> treats all invalid numbers (e.g., NaN, INF, -INF) as NaN.</p>
<tdstyle="text-align: left;">Returns true if any condition is true.</td>
655
653
</tr>
656
654
</tbody>
657
655
</table>
656
+
<divclass="warningsection">
657
+
<p><code>AND</code> and <code>OR</code> ignore NaN arguments during evaluation, so results may differ from <em>Excel</em> when subexpressions resolve to NaN.</p>
658
+
</div>
658
659
</div>
659
660
<divclass="notesection">
660
661
<p>The first argument to any logic function must be valid (i.e., not NaN). If the first argument evaluates to NaN, then NaN will be returned. Any subsequent arguments that evaluate to NaN will be ignored.</p>
<tdstyle="text-align: left;">Returns the cumulative interest paid on a loan between <em>StartPeriod</em> and <em>EndPeriod</em>, inclusive.<br>Type* specifies when payments are due: 0 = end of period, 1 = beginning of period.<br>NaN will be returned if <em>Rate</em> <= 0, <em>Periods</em> <= 0, <em>PresentValue</em> <= 0, if <em>StartPeriod</em> or <em>EndPeriod</em> are out of range, or if <em>Type</em> is not 0 or 1.</td>
<tdstyle="text-align: left;">Returns the cumulative principal paid on a loan between <em>StartPeriod</em> and <em>EndPeriod</em>, inclusive.<br>Note that <em>Type</em> specifies when payments are due: 0 = end of period, 1 = beginning of period.<br>NaN will be returned if <em>Rate</em> <= 0, <em>Periods</em> <= 0, <em>PresentValue</em> <= 0, if <em>StartPeriod</em> or <em>EndPeriod</em> are out of range, or if <em>Type</em> is not 0 or 1.</td>
<tdstyle="text-align: left;">Returns the effective annual interest rate, provided the nominal annual interest rate and the number of compounding periods per year.<br>NaN will be returned if <em>Periods</em> is < 1 or if <em>NominalRate</em> <= 0.</td>
<tdstyle="text-align: left;">Returns the future value of an investment based on a constant interest rate, a fixed number of periods, and periodic payments.<br>Note that <em>PresentValue</em> and <em>Type</em> are optional and default to 0.<br>Also, <em>Type</em> specifies when payments are due: 0 = end of period, 1 = beginning of period.<br>NaN will be returned if <em>Periods</em> <= 0 or if any required argument is not finite.</td>
<tdstyle="text-align: left;">Returns the interest portion of a payment for a specified period of an investment.<br>FutureValue* and <em>Type</em> are optional and default to 0.<br>Type* specifies when payments are due: 0 = end of period, 1 = beginning of period.</td>
<tdstyle="text-align: left;">Returns the nominal annual interest rate, provided the effective rate and the number of compounding periods per year.<br>NaN will be returned if <em>Periods</em> is < 1 or if <em>EffectiveRate</em> <= 0.</td>
<tdstyle="text-align: left;">Returns the number of periods for an investment or loan based on a constant interest rate, periodic payments, and present and future values.<br>Note that <em>FutureValue</em> and <em>Type</em> are optional and default to 0.<br>Also, <em>Type</em> specifies when payments are due: 0 = end of period, 1 = beginning of period.<br>NaN will be returned if any required argument is not finite or if the calculation is not defined.</td>
<tdstyle="text-align: left;">Returns the periodic payment for an investment or loan based on a constant interest rate, a fixed number of periods, and a present value.<br>Note that <em>FutureValue</em> and <em>Type</em> are optional and default to 0.<br>Also, <em>Type</em> specifies when payments are due: 0 = end of period, 1 = beginning of period.<br>NaN will be returned if <em>Periods</em> <= 0 or if any required argument is not finite.</td>
<tdstyle="text-align: left;">Returns the principal portion of a payment for a specified period of an investment.<br>Note that <em>FutureValue</em> and <em>Type</em> are optional and default to 0.<br>Also, <em>Type</em> specifies when payments are due: 0 = end of period, 1 = beginning of period.<br>NaN will be returned if arguments are invalid or out of range.</td>
<tdstyle="text-align: left;">Returns the present value of an investment based on a constant interest rate, a fixed number of periods, and periodic payments.<br>Note that <em>FutureValue</em> and <em>Type</em> are optional and default to 0.<br>Also, <em>Type</em> specifies when payments are due: 0 = end of period, 1 = beginning of period.<br>NaN will be returned if <em>Periods</em> <= 0 or if any required argument is not finite.</td>
<p><code>te_parser::evaluate()</code> uses a simple recursive descent parser to compile your expression into a syntax tree. For example, the expression <code>"sin x + 1/4"</code> parses as:</p>
<p><code>te_parser::evaluate()</code> also automatically prunes constant branches. In this example, the compiled expression returned by <code>compile()</code> would become:</p>
0 commit comments