System Variable FPC

From NARS2000
Revision as of 22:43, 21 February 2013 by Paul Robinson (talk | contribs) (add template)
Jump to navigationJump to search

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,

      ⎕PP←200
      ⎕FPC←64  ⋄ *1x
2.71828182845904523543
      ⎕FPC←128 ⋄ *1x
2.718281828459045235360287471352662497759
      ⎕FPC←256 ⋄ *1x
2.718281828459045235360287471352662497757247093699959574966967627724076630353555
      ⎕FPC←512 ⋄ *1x
2.71828182845904523536028747135266249775724709369995957496696762772407663035354759457138217852516642742746639193200305992181741359662904357290033429526059559

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

2.71828182845904523536028747135266249775724709369995957496696762772407663035354759457138217852516642742746639193200305992181741359662904357290033429526059563073813232862794349076323382988075319525101901157383418793070215408914993488...


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