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:

Introduced in 2017
 (11.2)