System Variable FPC: Difference between revisions

From NARS2000
Jump to navigationJump to search
m (Added see also ⎕CT)
No edit summary
Line 1: Line 1:
<h1>{quad}FPC - Floating Point Control</h1>
<h1><aplxx>⎕FPC</aplxx> - Floating Point Control</h1>
{{BoxStart|<apll>Z←⎕FPC</apll>
{{BoxStart|<apll>Z←⎕FPC</apll>
|returns the current value of the Floating Point Control precision.}}
|returns the current value of the Floating Point Control precision.}}
{{BoxEnd|<apll>Z</apll> is an integer scalar that represents the current value of the number of bits of precision used for [[Rational and VFP Numbers|VFP numbers]].}}
{{BoxEnd|<apll>Z</apll> is an integer scalar that represents the current value of the number of bits of precision used for [[Rational and VFP Numbers|Multiple-Precision Floating Point numbers]].}}
<br />
<br />


Line 15: Line 15:
<br />
<br />


<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 minimum value for <apll>⎕FPC</apll> is <apll>1</apll>; the maximum value is the largest positive 32-bit integer <apll>2147483647</apll>.</p>


<p>The system default value is <apll>128</apll>.</p>
<p>The system default value is <apll>128</apll>.</p>
Line 22: Line 22:
<p>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)</p>
<p>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)</p>


<apll>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⎕PP←240<br />
<apll><pre>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⎕FPC←64 &nbsp;⋄ *1x<br />
      ⎕PP←240
2.71828182845904523543<br />
      ⎕FPC←64 ⋄ *1x  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⎕FPC←128 ⋄ *1x<br />
2.7182818284590452354
2.718281828459045235360287471352662497759<br />
      ⎕FPC←128 ⋄ *1x  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⎕FPC←256 ⋄ *1x<br />
2.71828182845904523536028747135266249776
2.71828182845904523536028747135266249775724709369995957496696762 (Continued)<br/>
      ⎕FPC←256 ⋄ *1x  
7724076630353555<br />
2.71828182845904523536028747135266249775724709369995957496696762 (Continued)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⎕FPC←512 ⋄ *1x<br />
772407663035355
2.71828182845904523536028747135266249775724709369995957496696762 (Continued)<br/>
      ⎕FPC←512 ⋄ *1x  
7724076630353547594571382178525166427427466391932003059921817413 (Continued)<br/>
2.71828182845904523536028747135266249775724709369995957496696762 (Continued)  
59662904357290033429526059559<br />
7724076630353547594571382178525166427427466391932003059921817413 (Continued)  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;⎕FPC←1024 ⋄ *1x<br />
5966290435729003342952605956
2.71828182845904523536028747135266249775724709369995957496696762 (Continued)<br/>
      ⎕FPC←1024 ⋄ *1x  
7724076630353547594571382178525166427427466391932003059921817413 (Continued)<br/>
2.71828182845904523536028747135266249775724709369995957496696762 (Continued)  
5966290435729003342952605956307381323286279434907632338298807531 (Continued)<br/>
7724076630353547594571382178525166427427466391932003059921817413 (Continued)  
9525101901157383418793070215408914993488416750924</apll>
5966290435729003342952605956307381323286279434907632338298807531 (Continued)  
9525101901157383418793070215408914993488416750924</pre></apll>


<p>Whereas, according to Wolfram Alpha, the exact value to 230 digits is</p>
<p>Whereas, according to Wolfram Alpha, the exact value to 230 digits is</p>


<apll>2.71828182845904523536028747135266249775724709369995957496696762 (Continued)<br/>
<apll><pre>2.71828182845904523536028747135266249775724709369995957496696762 (Continued)
7724076630353547594571382178525166427427466391932003059921817413 (Continued)<br/>
7724076630353547594571382178525166427427466391932003059921817413 (Continued)
5966290435729003342952605956307381323286279434907632338298807531 (Continued)<br/>
5966290435729003342952605956307381323286279434907632338298807531 (Continued)
9525101901157383418793070215408914993488...</apll><br /><br>
9525101901157383418793070215408914993488...</pre></apll>
'''See Also: [[System_Variable_CT|Comparison Tolerance ⎕CT]]'''<br>
 
'''See Also: [[System_Variable_CT|Comparison Tolerance ⎕CT]]'''




{{System Variables}}
{{System Variables}}
{{Article footer}}
{{Article footer}}

Revision as of 12:16, 16 April 2018

⎕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 Multiple-Precision Floating Point 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 1; 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.7182818284590452354 
      ⎕FPC←128 ⋄ *1x 
2.71828182845904523536028747135266249776 
      ⎕FPC←256 ⋄ *1x 
2.71828182845904523536028747135266249775724709369995957496696762 (Continued) 
772407663035355
      ⎕FPC←512 ⋄ *1x 
2.71828182845904523536028747135266249775724709369995957496696762 (Continued) 
7724076630353547594571382178525166427427466391932003059921817413 (Continued) 
5966290435729003342952605956 
      ⎕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...

See Also: Comparison Tolerance ⎕CT


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}}}]]