System Variable FPC: Difference between revisions
Line 42: | Line 42: | ||
<br /> | <br /> | ||
<p>The minimum value for <apll>⎕FPC</apll> is <apll>53</apll>; the maximum value is the largest positive integer <apll> | <p>The minimum value for <apll>⎕FPC</apll> is <apll>53</apll>; the maximum value is the largest positive 32-bit integer <apll>2147483647</apll>.</p> | ||
<p>The system default value is <apll> | <p>The system default value is <apll>128</apll>.</p> | ||
<p>For example,</p> | <p>For example,</p> | ||
<apll> ⎕PP←200<br /> | <apll> ⎕PP←200<br /> | ||
⎕FPC←53 ⋄ *1x<br /> | ⎕FPC←53 ⋄ *1x<br /> | ||
2.7182818284590450908<br /> | 2.7182818284590450908<br /> | ||
⎕FPC←64 ⋄ *1x<br /> | ⎕FPC←64 ⋄ *1x<br /> | ||
2.71828182845904523543<br /> | 2.71828182845904523543<br /> | ||
⎕FPC←128 ⋄ *1x<br /> | ⎕FPC←128 ⋄ *1x<br /> |
Revision as of 10:22, 25 August 2011
Floating Point Control
|
||||
Z is an integer scalar that represents the current value of the number of bits of precision used for VFP numbers. |
|
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←53 ⋄ *1x
2.7182818284590450908
⎕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...