yields a version of expr in which all numbers have been set to have accuracy a.
- When SetAccuracy is used to increase the accuracy of a number, the number is padded with zeros. The zeros are taken to be in base 2. In base 10, the additional digits are usually not zeros.
- SetAccuracy returns an arbitrary‐precision number even if the number of significant digits obtained will be less than $MachinePrecision.
- When expr contains machine‐precision numbers, SetAccuracy[expr,a] can give results that differ from one computer system to another.
- SetAccuracy will first expose any hidden extra digits in the internal binary representation of a number, and, only after these are exhausted, add trailing zeros. »
- 0.004``25 generates a number with all trailing digits zero and accuracy 25 on any computer system.
- SetAccuracy[expr,a] does not modify expr itself.
Examplesopen allclose all
Basic Examples (2)
SetAccuracy does not affect exact powers:
Properties & Relations (2)
Since N works adaptively, the result has the requested accuracy of 20:
e is given by RealExponent:
Wolfram Research (1991), SetAccuracy, Wolfram Language function, https://reference.wolfram.com/language/ref/SetAccuracy.html.
Wolfram Language. 1991. "SetAccuracy." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SetAccuracy.html.
Wolfram Language. (1991). SetAccuracy. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SetAccuracy.html