System Variable FPC

From NARS2000
Revision as of 15:49, 25 May 2013 by WikiSysop (talk | contribs)
Jump to navigationJump to search

⎕FPC - Floating Point Control

Z←⎕FPC returns the current value of the Floating Point Control precision.
Z is an integer scalar that represents the current value of the number of bits of precision used for VFP numbers.


⎕FPC←R sets the value of the Floating Point Control precision to R.
⎕FPC←⍬ sets the value of the Floating Point Control precision to its system default state.


The minimum value for ⎕FPC is 53; the maximum value is the largest positive 32-bit integer 2147483647.

The system default value is 128.


For example, (note: these numbers are normally one long string of digits; they are broken here, with the break shown by (continued) for your convenience in reading)

      ⎕PP←240
      ⎕FPC←64  ⋄ *1x
2.71828182845904523543
      ⎕FPC←128 ⋄ *1x
2.718281828459045235360287471352662497759
      ⎕FPC←256 ⋄ *1x
2.71828182845904523536028747135266249775724709369995957496696762 (Continued)
7724076630353555
      ⎕FPC←512 ⋄ *1x
2.71828182845904523536028747135266249775724709369995957496696762 (Continued)
7724076630353547594571382178525166427427466391932003059921817413 (Continued)
59662904357290033429526059559
      ⎕FPC←1024 ⋄ *1x
2.71828182845904523536028747135266249775724709369995957496696762 (Continued)
7724076630353547594571382178525166427427466391932003059921817413 (Continued)
5966290435729003342952605956307381323286279434907632338298807531 (Continued)
9525101901157383418793070215408914993488416750924

Whereas, according to Wolfram Alpha, the exact value to 230 digits is

2.71828182845904523536028747135266249775724709369995957496696762 (Continued)
7724076630353547594571382178525166427427466391932003059921817413 (Continued)
5966290435729003342952605956307381323286279434907632338298807531 (Continued)
9525101901157383418793070215408914993488...


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 , . /
{{#ifeq:{{{1}}}|4||title="match" style="border-width:thick; border-color:blue; background-color:yellow;"|≡ {{#ifeq:{{{1}}}|7||title="iota" style="border-width:thick; border-color:blue; background-color:yellow;" |⍳ {{#ifeq:{{{1}}}|9||title="slash" style="border-width:thick; border-color:blue; background-color:yellow;" |/ {{#ifeq:{{{1}}}|11||title="diamond" style="border-width:thick; border-color:blue; background-color:yellow;" |⋄ {{#switch: {{{1}}}
NARS 2000 Lang
Tool
Bar

{{#ifeq:{{{1}}}|1||title="assign" style="border-width:thick; border-color:blue; background-color:yellow;" |←

→ bgcolor=cyan title="assign" |← → }}

{{#ifeq:{{{1}}}|2||title="plus" style="border-width:thick; border-color:blue; background-color:yellow;" |+

- × ÷ * ⍟ ⌹ ○ ! ? √ bgcolor=cyan title="plus" |+ - × ÷ * ⍟ ⌹ ○ ! ? √ }}

{{#ifeq:{{{1}}}|3||title="mod" style="border-width:thick; border-color:blue; background-color:yellow;" ||

⌈ ⌊ ⊥ ⊤ ⊣ ⊢
⌈ ⌊ ⊥ ⊤ ⊣ ⊢
≢ < ≤ = ≥ > ≠ bgcolor=cyan title="match" |≡ ≢ < ≤ = ≥ > ≠ }}

{{#ifeq:{{{1}}}|5||title="down caret" style="border-width:thick; border-color:blue; background-color:yellow;" |∨

∧ ⍱ ⍲ bgcolor=cyan title="down caret" |∨ ∧ ⍱ ⍲ }}

{{#ifeq:{{{1}}}|6||title="take" style="border-width:thick; border-color:blue; background-color:yellow;" |↑

↓ ⊂ ⊃ ⌷ ⍋ ⍒
↓ ⊂ ⊃ ⌷ ⍋ ⍒
∊ ⍸ ⍷ ∪ ∩ ⊆ ⊇ ~ § π .. bgcolor=cyan title="iota" |⍳ ∊ ⍸ ⍷ ∪ ∩ ⊆ ⊇ ~ § π .. }}

{{#ifeq:{{{1}}}|8||title="comma" style="border-width:thick; border-color:blue; background-color:yellow;" |,

⍪ ⍴ ⌽ ⊖ ⍉
⍪ ⍴ ⌽ ⊖ ⍉
\ ⌿ ⍀ ⊙ ¨ ⍨ ⍤ ⍡ ⍥ ⍦ . ∘ ⍠ ‼ ⌻ ∂ ∫ bgcolor=cyan title="slash" |/ \ ⌿ ⍀ ⊙ ¨ ⍨ ⍤ ⍣ ⍡ ⍥ ⍦ . ∘ ⍠ ‼ ⌻ ∂ ∫ }}

{{#ifeq:{{{1}}}|10||title="quotequad" style="border-width:thick; border-color:blue; background-color:yellow;" |⍞

⎕ ⍎ ⍕
⎕ ⍎ ⍕
⍝ ∇ ∆ ⍙ _ ⍺ ⍵ bgcolor=cyan title="diamond" |⋄ ⍝ ∇ ∆ ⍙ _ ⍺ ⍵ }}

{{#ifeq:{{{1}}}|12||title="neg" style="border-width:thick; border-color:blue; background-color:yellow;" |¯

⍬ ∞ title="neg" |¯ ⍬ ∞ ∅
colspan=8 |Second Row i j k a b e g p r v x z colspan=8 |Second Row i j k a b e g p r v x z colspan=8 |Second Row i j k a b e g p r v x z colspan=6 |Second Row i j k i j k l g p r v x

}}

{{#ifeq:{{{1}}}|0| |[[Category:Mouse Group {{{1}}}|{{{2}}}]]}}