This is documentation for Mathematica 5, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Documentation / Mathematica / Built-in Functions / Numerical Computation / Numerical Precision /


FilledSmallSquare SetPrecision[expr, p] yields a version of expr in which all numbers have been set to have precision p.

FilledSmallSquare When SetPrecision is used to increase the precision 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 zero.

FilledSmallSquare SetPrecision returns an arbitrary-precision number, even if the precision requested is less than $MachinePrecision.

FilledSmallSquare SetPrecision[expr, MachinePrecision] converts all numbers in expr to machine precision.

FilledSmallSquare If expr contains machine-precision numbers, SetPrecision[expr, p] can give results which differ from one computer system to another.

FilledSmallSquare SetPrecision will first expose any hidden extra digits in the internal binary representation of a number, and only after these are exhausted add trailing zeros.

FilledSmallSquare 0.004`25 generates a number with all trailing digits zero and precision 25 on any computer system.

FilledSmallSquare SetPrecision[expr, p] does not modify expr itself.

FilledSmallSquare See Section 3.1.5.

FilledSmallSquare See also: N, Precision, Chop, SetAccuracy, $MinPrecision, $NumberMarks.

FilledSmallSquare New in Version 2; modified in 5.0.

Further Examples