11.52.53 numerics

set numerics [ ( complex | real ) ] [ errors ( explicit | quiet) ]
    [ display ( latex | natural | typeable) ]
    [ sigfig <precision> ]

The set numerics command is used to adjust the way in which calculations are carried out and numerical quantities are displayed:

  • The option complex causes Pyxplot to switch from performing real arithmetic (default) to performing complex arithmetic. The option real causes any calculations which return results with finite imaginary components to generate errors.

  • The option errors controls how numerical errors such as divisions by zero, numerical overflows, and the querying functions outside of the domains in which they are defined, are communicated to the user. The option explicit (default) causes an error message to be displayed on the terminal whenever a calculation causes an error. The option quiet causes such calculations to silently generate a nan (not a number) result. The latter is especially useful when, for example, plotting an expression with the ordinate axis range set to extend outside the domain in which that expression returns a well-defined real result; it suppresses the error messages which might otherwise result from Pyxplot’s attempts to evaluate the expression in those domains where its result is undefined. The option nan is a synonym for quiet.

  • The setting display changes the format in which numbers are displayed on the terminal. Setting the option to typeable causes the numbers to be printed in a form suitable for pasting back into Pyxplot commands. The setting latex causes latex-compatible output to be generated. The setting natural generates concise, human-readable output which has neither of the above properties.

  • The setting sigfig changes the number of significant figures to which numbers are displayed on the Pyxplot terminal. Regardless of the value set, all calculations are internally carried out and stored at double precision, accurate to around 16 significant figures.