yCommandz |
|
yFloatingPointz |
|
yUSEz |
FLOAT
|
FLOAT A=1/3*10000 FLOAT FP(1)=SIN(RAD(30)) |
yFORMATz |
yFUNCTIONz |
FLOAT equation1 equation2 ...
|
Performing Floating Point Calculation |
yEXPLANATIONz |
The Floating point calculation is performed in FLOAT command.
A=expr. Expr is performed as Floating point calculation. When storethe value into A, It converts the value an Integer.
FP(n)=expr. Expr is performed as Floating point calculation, It stores the value into FP(n) as it is.
In the FLOAT command the functions:SIN,COS,TAN,ATAN,ACOS,SQRARAD,DEG,VAL,etc works as double precision functions.
|
|
|
' Get Pie FLOAT FP(6)=ACOS(SQR(3)/2)*6 FLOAT FP(6)=(FP(6)-3)*10 PRINT "PIE=3." FP(10000,6) ' Get Napier a=1 FLOAT FP(2)=1 FOR i=1 TO 100 a=a*i FLOAT FP(2)=FP(2)+1/a NEXT FLOAT FP(2)=(FP(2)-2)*10 PRINT "Napier=2." FP(10000,2) ' PRINT "Second order equation X*X+4*X+3" a=1 : b=4 : c=3 FLOAT FP(0)=(SQR(b*b-(4*a*c))-b)/2/a FLOAT FP(1)=(SQR(b*b-(4*a*c))*-1-b)/2/a PRINT FP(10000,0) FP(10000,1) ' |
|
|
[LASTMODIFY]2009-09-09 11:28:04 |
[CREATEDATE]2009-09-09 11:28:04 |
|
|
|
|