Macaulay2 » Documentation
Packages » Macaulay2Doc » matrices » format and display of matrices in Macaulay2 » printingAccuracy
next | previous | forward | backward | up | index | toc

# printingAccuracy -- current accuracy for printing numbers

- Usage:
    `printingAccuracy = n`
- Inputs:
  - n, an integer
- Consequences:
  - Henceforth, inexact numbers are printed with at most n digits to the right of the decimal point displayed. The special case where n=-1 is interpreted as meaning n=infinity, and this case is used when a number appears alone on an output line.

## Description

    i1 : printingPrecision,printingAccuracy

    o1 = (6, -1)

    o1 : Sequence

    i2 : 1p100e-5/3

    o2 = .000003333333333333333333333333333333

    o2 : RR (of precision 100)

    i3 : x = {1p100e-5/3,1p100e-4/3,1p100e-3/3,1p100e-2/3}

    o3 = {.00000333333, .0000333333, .000333333, .00333333}

    o3 : List

    i4 : printingAccuracy = 8

    o4 = 8

    i5 : x

    o5 = {.00000333, .00003333, .00033333, .00333333}

    o5 : List

    i6 : printingAccuracy = 4

    o6 = 4

    i7 : x

    o7 = {0, 0, .0003, .0033}

    o7 : List

## See also

- printingAccuracy -- current accuracy for printing numbers
- printingLeadLimit -- maximum number of leading zeroes to use when printing real numbers
- printingTrailLimit -- maximum number of additional trailing digits to use when printing real numbers
- printingSeparator -- string used to separate mantissa from exponent when printing real numbers
- format -- format a string or real number

## For the programmer

The object printingAccuracy is an integer.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/doc3.m2:168:0.