DefaultPrintPrecision

DefaultPrintPrecision

is an option for NumberForm, DecimalForm and related functions that specifies the default number of digits of precision with which to print machine numbers.

Details

  • With the setting DefaultPrintPrecisionn, machine real numbers in NumberForm print with n significant digits of precision.

Examples

open allclose all

Basic Examples  (1)

By default, machine real numbers print with 6 digits of precision:

Increase the print precision to 8 digits:

Scope  (2)

Use DefaultPrintPrecision with NumberForm:

ScientificForm:

DecimalForm:

AccountingForm:

EngineeringForm:

PaddedForm:

Set the value of the option DefaultPrintPrecision in DecimalForm:

DecimalForm now typesets machine reals with 12 digits:

Reset the option to its Automatic value:

Properties & Relations  (1)

Printing precision can also be specified with an argument of NumberForm, DecimalForm, etc:

When both the argument and the option are given, the argument takes precedence:

Wolfram Research (2017), DefaultPrintPrecision, Wolfram Language function, https://reference.wolfram.com/language/ref/DefaultPrintPrecision.html.

Text

Wolfram Research (2017), DefaultPrintPrecision, Wolfram Language function, https://reference.wolfram.com/language/ref/DefaultPrintPrecision.html.

CMS

Wolfram Language. 2017. "DefaultPrintPrecision." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DefaultPrintPrecision.html.

APA

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

BibTeX

@misc{reference.wolfram_2023_defaultprintprecision, author="Wolfram Research", title="{DefaultPrintPrecision}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/DefaultPrintPrecision.html}", note=[Accessed: 19-April-2024 ]}

BibLaTeX

@online{reference.wolfram_2023_defaultprintprecision, organization={Wolfram Research}, title={DefaultPrintPrecision}, year={2017}, url={https://reference.wolfram.com/language/ref/DefaultPrintPrecision.html}, note=[Accessed: 19-April-2024 ]}