Difference between revisions of "ApCoCoA-1:Fn.SetAccuracy"
From ApCoCoAWiki
S schuster (talk | contribs) |
m (insert version info) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | {{Version|1}} | ||
<command> | <command> | ||
<title>Fn.SetAccuracy</title> | <title>Fn.SetAccuracy</title> | ||
Line 8: | Line 9: | ||
N must be positive. An accracy of N means that all results X are rounded | N must be positive. An accracy of N means that all results X are rounded | ||
such that <tt>| X - TrueValue | <= 0.5*10^(-N)</tt>. | such that <tt>| X - TrueValue | <= 0.5*10^(-N)</tt>. | ||
+ | By default, the accuracy is set to 10. | ||
<itemize> | <itemize> | ||
Line 27: | Line 29: | ||
</example> | </example> | ||
</description> | </description> | ||
− | <see> | + | <see>ApCoCoA-1:Fn.GetAccuracy|Fn.GetAccuracy</see> |
<key>Fn.SetAccuracy</key> | <key>Fn.SetAccuracy</key> | ||
− | <key> | + | <key>elemfns.SetAccuracy</key> |
<key>SetAccuracy</key> | <key>SetAccuracy</key> | ||
− | <wiki-category>Package_elemfns</wiki-category> | + | <wiki-category>ApCoCoA-1:Package_elemfns</wiki-category> |
</command> | </command> |
Latest revision as of 10:05, 7 October 2020
This article is about a function from ApCoCoA-1. |
Fn.SetAccuracy
Set the default accuracy.
Syntax
Fn.SetAccuracy(N:INT):NULL
Description
N must be positive. An accracy of N means that all results X are rounded
such that | X - TrueValue | <= 0.5*10^(-N).
By default, the accuracy is set to 10.
@param N the accuracy to be set.
Example
Fn.SetAccuracy(10); X1 := Fn.Sin(1); Fn.SetAccuracy(30); X2 := Fn.Sin(1); Dec(X1, 100); Dec(X2, 100); 0.8414709848 ------------------------------- 0.84147098480789650665250232163 -------------------------------