System Variable PP

From NARS2000
Jump to: navigation, search

⎕PP - Print Precision

⎕PP Print Precision
⎕PP←'VALUE'

System Variable ⎕PP or Quad PP refers to Print Precision. In NARS, the default Print Precision is:

      ⎕PP
10
      1÷3
0.3333333333   ⍝ 10 significant digits after the decimal point are shown
      ⍕1÷3
0.3333333333   ⍝ 10 significant digits after the decimal point are shown, for formatted result
      ⍴⍕1÷3
12             ⍝ 10 significant digits after the decimal point, plus 0 and decimal point itself = 12 chars (shape)

      X←1÷3
      X
0.3333333333
      ⎕PP←4    ⍝ print precision changed to 4 digits
      X
0.3333
      X←⍎⍕X    ⍝ X is now formatted(printed) and re-executed into a number (for demonstration purposes only, AVOID in practice!!!)
      X
0.3333
      ⎕PP←10   ⍝ print precision is restored to 10 digits
      X
0.3333         ⍝ but X now only has 4 significant digits in it, as a result of ⎕PP reduction, formatting and re-execution into a number.

Although 10 significant digits represent the print precision or displayed precision - actual computer stored formats are quite different. Historically or customarily, ⎕PP is normally assigned a value of between 1 and 16, although with 64-bit systems, higher print precision values are available. As an example, pollution is frequently cited in PPM's or parts per million or say 1 in 1,000,000 so 5-signficant digits in the data plus 7 digits within a million base might mean ⎕PP should be set as 5+7 = 12 significant digits, or greater for higher precision printed reports. Note that print precision does NOT normally affect stored/digitized numbers, unless the numbers were first formatted/printed, then re-executed into digital floating point numbers as the above example shows.

See also System Function ⎕DR.

System Variables (A value may be assigned to these except for ⎕DM)
ALX CT DM DT ELX FC FEATURE FPC IC IO
LX PP PR PW RL SA WSID
Niladic System Functions (a value cannot be assigned to these)
A AV EM ET LC NNAMES NNUMS SYSID SYSVER T
TC TCBEL TCBS TCESC TCFF TCHT TCLF TCNL TCNUL TS
WA
Monadic or dyadic system functions (a value cannot be assigned to these)
AT CR DC DL DR EA EC ERROR ES EX
FMT FX MF NAPPEND NC NCREATE NERASE NINFO NL NLOCK
NREAD NRENAME NREPLACE NRESIZE NSIZE NTIE NUNTIE STOP TF TRACE
UCS VR
Note that quad functions and variables are case insensitive


See Also
System Commands System Variables and Functions Operators
Keyboard
A+S
Alt ¨ ¯ < > × ÷
Sh ~ ! @ # $ % ^ & * ( ) _ +
Key ` 1 2 3 4 5 6 7 8 9 0 - =
A+S
Alt ? π
Sh Q W E R T Y U I O P { } |
Key q w e r t y u i o p [ ] \
A+S §
Alt '
Sh A S D F G H J K L : "
Key a s d f g h j k l ; '
A+S
Alt
Sh Z X C V B N M < > ?
Key z x c v b n m , . /
NARS 2000 Lang
Tool
Bar
+ - × ÷ * ! ? |
= < >
~ § π .. ,
/ \ ¨ .
_ ¯ Ø b e g p r v x



This NARS2000 article is a stub and needs further work.