WOLFRAM

Copy to clipboard.

gives the minimum number of digits of precision to be allowed in arbitraryprecision numbers.

Details

  • The default value of $MinPrecision is 0.
  • Positive values of $MinPrecision make the Wolfram Language pad arbitraryprecision numbers with zero digits to achieve the specified nominal precision. The zero digits are taken to be in base 2, and may not correspond to zeros in base 10.
  • $MaxPrecision=$MinPrecision=n makes the Wolfram Language do fixedprecision arithmetic.
  • $MinPrecision is measured in decimal digits, and need not be an integer.

Examples

open allclose all

Basic Examples  (2)Summary of the most common use cases

Make sure precision is kept at or above machine precision in a calculation:

Out[1]=1

Do a computation with fixed 20-digit precision:

Out[1]=1

Applications  (1)Sample problems that can be solved with this function

Power method for the largest eigenvalue using fixed precision:

Find the largest eigenvalue of the 4×4 Hilbert matrix to 47 digits:

Out[2]=2

Without fixed precision the result indicates lost precision:

Out[3]=3

The fixed precision is correct to 47 digits since the iteration is self-correcting:

Out[4]=4

Possible Issues  (1)Common pitfalls and unexpected behavior

$MinPrecision does not affect parts of computations with machine numbers:

Out[1]=1
Out[2]=2

If needed, use SetPrecision to eliminate machine numbers from the input:

Out[3]=3
Wolfram Research (1996), $MinPrecision, Wolfram Language function, https://reference.wolfram.com/language/ref/$MinPrecision.html (updated 2003).
Copy to clipboard.
Wolfram Research (1996), $MinPrecision, Wolfram Language function, https://reference.wolfram.com/language/ref/$MinPrecision.html (updated 2003).

Text

Wolfram Research (1996), $MinPrecision, Wolfram Language function, https://reference.wolfram.com/language/ref/$MinPrecision.html (updated 2003).

Copy to clipboard.
Wolfram Research (1996), $MinPrecision, Wolfram Language function, https://reference.wolfram.com/language/ref/$MinPrecision.html (updated 2003).

CMS

Wolfram Language. 1996. "$MinPrecision." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2003. https://reference.wolfram.com/language/ref/$MinPrecision.html.

Copy to clipboard.
Wolfram Language. 1996. "$MinPrecision." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2003. https://reference.wolfram.com/language/ref/$MinPrecision.html.

APA

Wolfram Language. (1996). $MinPrecision. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$MinPrecision.html

Copy to clipboard.
Wolfram Language. (1996). $MinPrecision. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/$MinPrecision.html

BibTeX

@misc{reference.wolfram_2024_$minprecision, author="Wolfram Research", title="{$MinPrecision}", year="2003", howpublished="\url{https://reference.wolfram.com/language/ref/$MinPrecision.html}", note=[Accessed: 20-January-2025 ]}

Copy to clipboard.
@misc{reference.wolfram_2024_$minprecision, author="Wolfram Research", title="{$MinPrecision}", year="2003", howpublished="\url{https://reference.wolfram.com/language/ref/$MinPrecision.html}", note=[Accessed: 20-January-2025 ]}

BibLaTeX

@online{reference.wolfram_2024_$minprecision, organization={Wolfram Research}, title={$MinPrecision}, year={2003}, url={https://reference.wolfram.com/language/ref/$MinPrecision.html}, note=[Accessed: 20-January-2025 ]}

Copy to clipboard.
@online{reference.wolfram_2024_$minprecision, organization={Wolfram Research}, title={$MinPrecision}, year={2003}, url={https://reference.wolfram.com/language/ref/$MinPrecision.html}, note=[Accessed: 20-January-2025 ]}