System Variable PP: Difference between revisions
(wording, description) |
No edit summary |
||
(2 intermediate revisions by one other user not shown) | |||
Line 1: | Line 1: | ||
<h1> | <h1><aplxx>⎕PP</aplxx> - Print Precision</h1> | ||
{{BoxStart|⎕PP | {{BoxStart|⎕PP | ||
| Print Precision}} | | Print Precision}} | ||
{{BoxEnd|⎕PP←'<i>VALUE</i>'}} | {{BoxEnd|⎕PP←'<i>VALUE</i>'}} | ||
System Variable | System Variable <apll>⎕PP</apll> refers to Print Precision. | ||
In | In NARS2000, the default Print Precision is: | ||
<pre> | |||
<apll><pre> | |||
⎕PP | ⎕PP | ||
10 | 10 | ||
</pre> | 1÷3 | ||
Although 10 significant digits represent the print precision or displayed precision | 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. | |||
</pre></apll> | |||
Although 10 significant digits represent the print precision or displayed precision, actual computer stored formats are quite different. Historically or customarily, <apll>⎕PP</apll> is normally assigned a value of between 1 and 16, although with [[Rational_and_VFP_Numbers|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 <apll>⎕PP</apll> 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 Function ⎕DR]]'''. | |||
{{System Variables}} | {{System Variables}} | ||
{{Article footer}} | {{Article footer}} | ||
{{stub}} | {{stub}} |
Latest revision as of 12:00, 16 April 2018
⎕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 | ||||||||||||||
Alt+Shift | ⍪ | ≡ | ≢ | ⍒ | ⍋ | ⌽ | ⍉ | ⊖ | ⍟ | ⍱ | ⍲ | ⍠ | ⌹ | |
Alt | ⋄ | ¨ | ¯ | < | ≤ | ∅ | ≥ | > | ≠ | ∨ | ∧ | × | ÷ | |
Shift | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | + | |
Key | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | |
Alt+Shift | ⍷ | √ | ⍨ | ⍸ | ⍥ | ⍣ | ⍞ | ⍬ | ⊣ | |||||
Alt | ? | ⍵ | ∊ | ⍴ | § | ↑ | ↓ | ⍳ | ○ | π | ← | → | ⊢ | |
Shift | Q | W | E | R | T | Y | U | I | O | P | { | } | | | |
Key | q | w | e | r | t | y | u | i | o | p | [ | ] | \ | |
Alt+Shift | ∫ | ∂ | ⌻ | ⍢ | ⍙ | ⍤ | ⍫ | ⌷ | ||||||
Alt | ⍺ | ⌈ | ⌊ | ∞ | ∇ | ∆ | ∘ | ‼ | ⎕ | ⍎ | ⍕ | |||
Shift | A | S | D | F | G | H | J | K | L | : | " | |||
Key | a | s | d | f | g | h | j | k | l | ; | ' | |||
Alt+Shift | ⊆ | ⊇ | χ | ⍡ | ⍭ | ⊙ | ||||||||
Alt | ⊂ | ⊃ | ∩ | ∪ | ⊥ | ⊤ | ⍦ | ⍝ | ⍀ | ⌿ | ||||
Shift | 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.