System Variable PP

From NARS2000
Jump to navigationJump to search

⎕PP - Print Precision

⎕PP Print Precision
⎕PP←'VALUE'

System Variable ⎕PP refers to Print Precision. In NARS2000, 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 Multiple-precision Floating Point numbers, higher print precision values may be needed. 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 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
LR LX PP PR PW RL SA WSID
Niladic System Functions (a value cannot be assigned to these)
A AV EM ET LC NNAMES NNUMS SI 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 DFT 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 (except for the ⎕A family of functions) 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
+ - × ÷ * ! ? |
< = >
~ § π .. ,
/ \ ¨ .
_ ¯
Second Row i j k i j k l g p r v x

[[Category:Mouse Group {{{1}}}|{{{2}}}]]




This NARS2000 article is a stub and needs further work.