1,150 bytes added,
13:13, 24 February 2012 Sets floating point compare accuracy by specifying the tolerance value to be used when floating point values are compared.
Two floating point values will be considered equal if "abs(Value1 – Value2) <= ε", where ε is the tolerance value.
By default, the tolerance value is 2.2204460492503131e-012.
== Usage ==
<syntaxhighlight>SetFPCompareAccuracy(Accuracy)</syntaxhighlight>
== Parameters ==
<code>Accuracy</code> - an FPC constant or a numerical expression specifying a tolerance value as follows:
{|
<code>fpcVeryLowAccuracy</code>||0||02.2204460492503131e-8
|-
<code>fpcLowAccuracy</code>||1||12.2204460492503131e-10
|-
<code>fpcMedAccuracy</code>||2||22.2204460492503131e-12 (Default)
|-
<code>fpcHighAccuracy</code>||3||32.2204460492503131e-14
|-
<code>fpcVeryHighAccuracy</code>||4||42.2204460492503131e-16
|-
<code>fpcExact</code>||5||50.00
|}
== Example ==
Set floating point compare accuracy to High:
<syntaxhighlight>SetFPCompareAccuracy(3);</syntaxhighlight>
Set floating point compare accuracy to High:
<syntaxhighlight>SetFPCompareAccuracy(fpcHighAccuracy);</syntaxhighlight>
[[Category:Execution Control]]