From: George H. <geo...@us...> - 2006-02-08 10:51:53
|
Update of /cvsroot/win32forth/win32forth/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7376/win32forth/src Modified Files: FLOAT.F Log Message: gah: More documenting of float.f (still work in progress). Index: FLOAT.F =================================================================== RCS file: /cvsroot/win32forth/win32forth/src/FLOAT.F,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** FLOAT.F 7 Feb 2006 11:26:46 -0000 1.35 --- FLOAT.F 8 Feb 2006 10:51:43 -0000 1.36 *************** *** 121,131 **** end-code ! \- B/FLOAT 10 constant B/FLOAT ( -- n ) \ W32F Floating extra \ *G Number of bytes in a floating-point number. Note the default is 8 bytes. cr B/FLOAT . .( byte floating point numbers) \ The next word is mainly for SEE.F ! B/FLOAT aligned cell / value cells/float \ *G Number of cells in a floating-point number. If the number of bytes is not a multiple \ ** of 4 this is rounded up. --- 121,134 ---- end-code ! [undefined] B/FLOAT [if] ! 10 constant B/FLOAT ( -- n ) \ W32F Floating extra \ *G Number of bytes in a floating-point number. Note the default is 8 bytes. + [then] cr B/FLOAT . .( byte floating point numbers) \ The next word is mainly for SEE.F ! B/FLOAT aligned cell / checkstack ! value cells/float \ *G Number of cells in a floating-point number. If the number of bytes is not a multiple \ ** of 4 this is rounded up. *************** *** 149,154 **** fstack-elements B/FLOAT * NEWUSER FLOATSTACK ! ' FLOATSTACK >body @ constant FSTACK \ pointer to the stack relative to UP ! ' FLOATSP >body @ constant FSP \ pointer to fsp relative to UP in-system --- 152,157 ---- fstack-elements B/FLOAT * NEWUSER FLOATSTACK ! ' FLOATSTACK >body @ constant FSTACK deprecated \ pointer to the stack relative to UP ! ' FLOATSP >body @ constant FSP deprecated \ pointer to fsp relative to UP in-system *************** *** 619,623 **** ! code f0.0 ( FS: -- r ) \ W32F Floating extra \ *G Push plus zero on to the FP stack. fldz --- 622,626 ---- ! code f0.0 ( fs: -- r ) \ W32F Floating extra \ *G Push plus zero on to the FP stack. fldz *************** *** 631,635 **** float; ! code fL2t ( fs: -- r ) \ W32F Floating extra \ *G Push the value of log base 2 of 10. fldl2t --- 634,638 ---- float; ! code fL2t ( fs: -- r ) \ W32F Floating extra \ *G Push the value of log base 2 of 10. fldl2t *************** *** 637,641 **** float; ! code fL2e ( fs: -- r ) \ W32F Floating extra \ *G Push the value of log base 2 of e. fldL2e --- 640,644 ---- float; ! code fL2e ( fs: -- r ) \ W32F Floating extra \ *G Push the value of log base 2 of e. fldL2e *************** *** 643,647 **** float; ! code fLog2 ( fs: -- r ) \ W32F Floating extra \ *G Push the value of log base 10 of 2. fldLg2 --- 646,650 ---- float; ! code fLog2 ( fs: -- r ) \ W32F Floating extra \ *G Push the value of log base 10 of 2. fldLg2 *************** *** 649,653 **** float; ! code fLn2 ( fs: -- r ) \ W32F Floating extra \ *G Push the value of ln 2 (the natural logarithm). fldLn2 --- 652,656 ---- float; ! code fLn2 ( fs: -- r ) \ W32F Floating extra \ *G Push the value of ln 2 (the natural logarithm). fldLn2 *************** *** 655,667 **** float; ! B/FLOAT 10 = nostack ! [IF] stack-check ! f0.0 fconstant finf \ infinity ! ' finf >body 0x80000000 over cell+ ! nostack ! 0x7fff swap 2 cells+ w! stack-check ! f1.0 fconstant f2.0 ! 1 ' f2.0 >body 2 cells+ w+! fvariable a2**63 --- 658,679 ---- float; ! (( Note the following constants are defined later, after the arithmetic operators ! But are included here for documentation purposes ONLY. ! f1.0 f0.0 f/ ! fconstant finf ( fs: -- r ) \ W32F Floating extra ! \ *G Push plus infinity. ! 2e0 fconstant f2.0 ( fs: -- r ) \ W32F Floating extra ! \ *G Push floating-point 2.0. ! ! 10e0 fconstant f10.0 ( fs: -- r ) \ W32F Floating extra ! \ *G Push floating-point 10.0. ! ! 5e-1 fconstant f0.5 ( fs: -- r ) \ W32F Floating extra ! \ *G Push floating-point 0.5. ! )) ! ! B/FLOAT 10 = [IF] fvariable a2**63 *************** *** 680,690 **** 0xbffd sq2/2m1 2 cells+ w! - f0.0 fconstant f10.0 \ floating 10.0 - ' f10.0 >body 0xa0000000 over cell+ ! nostack - 0x4002 swap 2 cells+ w! stack-check - - f1.0 fconstant f0.5 \ floating 0.5 - 0x3ffe ' f0.5 >body 2 cells+ w! - f0.0 fconstant fbig ' fbig >body -1 over ! nostack --- 692,695 ---- *************** *** 695,731 **** 1 ' feps >body ! ! fvariable afsmall ! 0 afsmall ! 0x80000000 afsmall cell+ ! ! 1 afsmall 2 cells+ w! ! ! : fsmall afsmall f@ ; \ smallest "normal" number ! ! [ELSE] ( 8 byte mode ) stack-check ! ! f0.0 fconstant finf ( FS: -- r ) \ W32F Floating extra ! \ *G Push plus infinity. ! ' finf >body 0 over ! 0x7ff00000 swap cell+ ! ! ! f1.0 fconstant f2.0 ( FS: -- r ) \ W32F Floating extra ! \ *G Push floating-point 2.0. ! 0x40000000 ' f2.0 >body cell+ ! ! ! f0.0 fconstant f10.0 ( FS: -- r ) \ W32F Floating extra ! \ *G Push floating-point 10.0. ! ' f10.0 >body 0 over ! 0x40240000 swap cell+ ! ! f1.0 fconstant f0.5 ( FS: -- r ) \ W32F Floating extra ! \ *G Push floating-point 0.5. ! ' f0.5 >body 0 over ! 0x3fe00000 swap cell+ ! ! f0.0 fconstant fbig ( FS: -- r ) \ W32F Floating extra \ *G Push the largest non-infinite floating-point number. ' fbig >body -1 over ! 0x7fefffff swap cell+ ! ! f0.0 fconstant feps ( FS: -- r ) \ W32F Floating extra \ *G Push the smallest non-zero floating-point number. 1 ' feps >body ! ! f1.0 fconstant fsmall ( FS: -- r ) \ W32F Floating extra \ *G Push the smallest non-denormalised floating-point number. ' fsmall >body 0 over ! 0x00100000 swap cell+ ! --- 700,718 ---- 1 ' feps >body ! ! f0.0 fconstant fsmall ! 0 ' fsmall >body tuck ! 0x80000000 over cell+ ! ! 1 swap 2 cells+ w! ! [ELSE] ( 8 byte mode ) ! f0.0 fconstant fbig ( fs: -- r ) \ W32F Floating extra \ *G Push the largest non-infinite floating-point number. ' fbig >body -1 over ! 0x7fefffff swap cell+ ! ! f0.0 fconstant feps ( fs: -- r ) \ W32F Floating extra \ *G Push the smallest non-zero floating-point number. 1 ' feps >body ! ! f1.0 fconstant fsmall ( fs: -- r ) \ W32F Floating extra \ *G Push the smallest non-denormalised floating-point number. ' fsmall >body 0 over ! 0x00100000 swap cell+ ! *************** *** 733,741 **** \ *N Variables ! fvariable a2**63 ( -- addr ) \ W32F Floating extra \ *G Return the address of a float containing 2**63. 0 a2**63 ! 0x43e00000 a2**63 cell+ ! ! fvariable sq2m1 ( -- addr ) \ W32F Floating extra \ *G Return the address of a float containing sqrt(2) - 1. 0x99fcef34 sq2m1 ! --- 720,728 ---- \ *N Variables ! fvariable a2**63 ( -- addr ) \ W32F Floating extra \ *G Return the address of a float containing 2**63. 0 a2**63 ! 0x43e00000 a2**63 cell+ ! ! fvariable sq2m1 ( -- addr ) \ W32F Floating extra \ *G Return the address of a float containing sqrt(2) - 1. 0x99fcef34 sq2m1 ! *************** *** 788,792 **** in-application ! code FLOOR ( fs: r1 -- r2 ) \ ANSI Floating \ *G Round r1 to an integral value using the round toward negative infinity rule, \ ** giving r2. --- 775,779 ---- in-application ! code FLOOR ( fs: r1 -- r2 ) \ ANSI Floating \ *G Round r1 to an integral value using the round toward negative infinity rule, \ ** giving r2. *************** *** 797,801 **** float; ! code FCEIL ( fs: r1 -- r2 ) \ W32F Floating extra \ *G Round r1 to an integral value using the round toward positive infinity rule, \ ** giving r2. --- 784,788 ---- float; ! code FCEIL ( fs: r1 -- r2 ) \ W32F Floating extra \ *G Round r1 to an integral value using the round toward positive infinity rule, \ ** giving r2. *************** *** 806,810 **** float; ! code FTRUNC ( fs: r1 -- r2 ) \ W32F Floating extra \ *G Round r1 to an integral value using the round toward zero rule, giving r2. push ebx --- 793,797 ---- float; ! code FTRUNC ( fs: r1 -- r2 ) \ W32F Floating extra \ *G Round r1 to an integral value using the round toward zero rule, giving r2. push ebx *************** *** 815,819 **** float; ! code FROUND ( fs: r1 -- r2 ) \ ANSI Floating \ *G Round r1 to an integral value using the round to nearest rule, giving r2. push ebx --- 802,806 ---- float; ! code FROUND ( fs: r1 -- r2 ) \ ANSI Floating \ *G Round r1 to an integral value using the round to nearest rule, giving r2. push ebx *************** *** 830,834 **** \ *N Integer to float conversion ! code D>F ( d -- ; Fs: -- r ) \ ANSI Floating \ *G Convert double number to floating-point number. lea esp, -4 [esp] --- 817,821 ---- \ *N Integer to float conversion ! code D>F ( d -- ; Fs: -- r ) \ ANSI Floating \ *G Convert double number to floating-point number. lea esp, -4 [esp] *************** *** 843,847 **** \ Changed 3/13/99 rls ! code F>D ( -- d ; fs: r -- ) \ ANSI Floating \ *G Convert floating-point number to double number, by rounding towards zero. If the \ ** result would be too large to fit in a double number then \n -9223372036854775808 --- 830,834 ---- \ Changed 3/13/99 rls ! code F>D ( -- d ; fs: r -- ) \ ANSI Floating \ *G Convert floating-point number to double number, by rounding towards zero. If the \ ** result would be too large to fit in a double number then \n -9223372036854775808 *************** *** 862,868 **** float; ! code ZF>D ( -- d ; fs: r -- ) \ W32F Floating extra \ *G Convert floating-point number to double number, using the current rounding mode ! \ ** (rounding towards zero unless changed by the user). If the result would be too \ ** large to fit in a double number then \n -9223372036854775808 is returned. fstack-check_1 --- 849,855 ---- float; ! code ZF>D ( -- d ; fs: r -- ) \ W32F Floating extra \ *G Convert floating-point number to double number, using the current rounding mode ! \ ** (rounding towards nearest unless changed by the user). If the result would be too \ ** large to fit in a double number then \n -9223372036854775808 is returned. fstack-check_1 *************** *** 875,883 **** float; ! : s>f ( n -- ; fs: -- r ) \ W32F Floating extra \ *G Convert the single number n to floating point number r. s>d d>f ; ! : f>s ( -- n ; fs: r -- ) \ W32F Floating extra \ *G Convert the floating point number r to single number n. f>d drop ; --- 862,870 ---- float; ! : s>f ( n -- ; fs: -- r ) \ W32F Floating extra \ *G Convert the single number n to floating point number r. s>d d>f ; ! : f>s ( -- n ; fs: r -- ) \ W32F Floating extra \ *G Convert the floating point number r to single number n. f>d drop ; *************** *** 901,905 **** \ from Jos v.d. Ven ! code SFS>DS ( -- float ; fs: r -- ) \ W32F Floating extra \ *G Push the top of the float stack onto the data stack as a 32-bit float. \ ** This function is for passing floats to DLLs. --- 888,892 ---- \ from Jos v.d. Ven ! code SFS>DS ( -- float ; fs: r -- ) \ W32F Floating extra \ *G Push the top of the float stack onto the data stack as a 32-bit float. \ ** This function is for passing floats to DLLs. *************** *** 981,990 **** f< not ; ! : FMAX ( fs: r1 r2 -- r3 ) \ ANSI Floating \ *G Return r3 the maximum of r1 and r2. If r1 is a NAN then so is r3. If r2 is a NAN \ ** then r3=r1. f2dup f< IF fswap THEN fdrop ; ! : FMIN ( fs: r1 r2 -- r3 ) \ ANSI Floating \ *G Return r3 the minimum of r1 and r2. If r1 is a NAN then so is r3. If r2 is a NAN \ ** then r3=r1. --- 968,977 ---- f< not ; ! : FMAX ( fs: r1 r2 -- r3 ) \ ANSI Floating \ *G Return r3 the maximum of r1 and r2. If r1 is a NAN then so is r3. If r2 is a NAN \ ** then r3=r1. f2dup f< IF fswap THEN fdrop ; ! : FMIN ( fs: r1 r2 -- r3 ) \ ANSI Floating \ *G Return r3 the minimum of r1 and r2. If r1 is a NAN then so is r3. If r2 is a NAN \ ** then r3=r1. *************** *** 997,1001 **** \ *N Arithmetic operators ! code F+ ( fs: r1 r2 -- r3 ) \ ANSI Floating \ *G Add r1 to r2. fstack-check_2 --- 984,988 ---- \ *N Arithmetic operators ! code F+ ( fs: r1 r2 -- r3 ) \ ANSI Floating \ *G Add r1 to r2. fstack-check_2 *************** *** 1005,1009 **** float; ! code F- ( fs: r1 r2 -- r3 ) \ ANSI Floating \ *G Subtract r2 from r1. fstack-check_2 --- 992,996 ---- float; ! code F- ( fs: r1 r2 -- r3 ) \ ANSI Floating \ *G Subtract r2 from r1. fstack-check_2 *************** *** 1013,1017 **** float; ! code F* ( fs: r1 r2 -- r3 ) \ ANSI Floating \ *G Multiply r1 by r2. fstack-check_2 --- 1000,1004 ---- float; ! code F* ( fs: r1 r2 -- r3 ) \ ANSI Floating \ *G Multiply r1 by r2. fstack-check_2 *************** *** 1021,1025 **** float; ! code F/ ( fs: r1 r2 -- r3 ) \ ANSI Floating \ *G Divide r1 by r2. fstack-check_2 --- 1008,1012 ---- float; ! code F/ ( fs: r1 r2 -- r3 ) \ ANSI Floating \ *G Divide r1 by r2. fstack-check_2 *************** *** 1029,1033 **** float; ! code FNEGATE ( fs: r1 -- r2 ) \ ANSI Floating \ *G Reverse the sign of r1. fstack-check_1 --- 1016,1020 ---- float; ! code FNEGATE ( fs: r1 -- r2 ) \ ANSI Floating \ *G Reverse the sign of r1. fstack-check_1 *************** *** 1037,1049 **** float; ! : 1/f ( fs: r1 -- r2 ) \ W32F Floating extra \ *G r2 is the reciprocal of r1. f1.0 fswap f/ ; ! code f2/ ( fs: r1 -- r2 ) \ W32F Floating extra \ *G Multiply by 2. fstack-check_1 fld1 - fchs >FPU fscale --- 1024,1035 ---- float; ! : 1/f ( fs: r1 -- r2 ) \ W32F Floating extra \ *G r2 is the reciprocal of r1. f1.0 fswap f/ ; ! code f2* ( fs: r1 -- r2 ) \ W32F Floating extra \ *G Multiply by 2. fstack-check_1 fld1 >FPU fscale *************** *** 1052,1059 **** float; ! code f2* ( fs: r1 -- r2 ) \ W32F Floating extra \ *G Divide by 2. fstack-check_1 fld1 >FPU fscale --- 1038,1046 ---- float; ! code f2/ ( fs: r1 -- r2 ) \ W32F Floating extra \ *G Divide by 2. fstack-check_1 fld1 + fchs >FPU fscale *************** *** 1062,1066 **** float; ! code FABS ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the absolute value of r1. fstack-check_1 --- 1049,1053 ---- float; ! code FABS ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the absolute value of r1. fstack-check_1 *************** *** 1070,1074 **** float; ! code FSQRT ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the positive square root of r1. fstack-check_1 --- 1057,1061 ---- float; ! code FSQRT ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the positive square root of r1. fstack-check_1 *************** *** 1078,1081 **** --- 1065,1078 ---- float; + \ The following constants are documented earlier + + f1.0 f0.0 f/ fconstant finf ( fs: -- r ) + + f1.0 f2* fconstant f2.0 ( fs: -- r ) + + f2.0 fdup f2* f2* f+ fconstant f10.0 ( fs: -- r ) + + f1.0 f2/ fconstant f0.5 ( fs: -- r ) + internal *************** *** 1152,1169 **** \ *N Trigonometric functions ! : FSIN ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the sine of r1 in radians. >a2**63_frem2pi (fsin) ; ! : FCOS ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the cosine of r1 in radians. >a2**63_frem2pi (fcos) ; ! : FSINCOS ( fs: r1 -- r2 r3 ) \ ANSI Floating ext \ *G r2 is the sine and r3 the cosine of r1 in radians. This function is more efficient \ ** than calling FSIN and FCOS separately. >a2**63_frem2pi (fsincos) ; ! : FTAN ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the tangent of r1 in radians. fsincos f/ ; --- 1149,1166 ---- \ *N Trigonometric functions ! : FSIN ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the sine of r1 in radians. >a2**63_frem2pi (fsin) ; ! : FCOS ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the cosine of r1 in radians. >a2**63_frem2pi (fcos) ; ! : FSINCOS ( fs: r1 -- r2 r3 ) \ ANSI Floating ext \ *G r2 is the sine and r3 the cosine of r1 in radians. This function is more efficient \ ** than calling FSIN and FCOS separately. >a2**63_frem2pi (fsincos) ; ! : FTAN ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the tangent of r1 in radians. fsincos f/ ; *************** *** 1171,1175 **** \ *N Inverse Trigonometric functions ! code FASIN ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the radian angle whose sine is r1. The result for |x| =< 1 is between ±pi/2. \ ** The result for |x| > 1 is NAN. --- 1168,1172 ---- \ *N Inverse Trigonometric functions ! code FASIN ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the radian angle whose sine is r1. The result for |x| =< 1 is between ±pi/2. \ ** The result for |x| > 1 is NAN. *************** *** 1187,1191 **** float; ! code FACOS ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the radian angle whose cosine is r1. The result for |x| =< 1 is between 0 and pi. \ ** The result for |x| > 1 is NAN --- 1184,1188 ---- float; ! code FACOS ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the radian angle whose cosine is r1. The result for |x| =< 1 is between 0 and pi. \ ** The result for |x| > 1 is NAN *************** *** 1204,1208 **** float; ! code FATAN ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the radian angle whose tangent is r1. The result is between ±pi/2. fstack-check_1 --- 1201,1205 ---- float; ! code FATAN ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the radian angle whose tangent is r1. The result is between ±pi/2. fstack-check_1 *************** *** 1213,1217 **** float; ! code FATAN2 ( fs: r1 r2 -- r3 ) \ ANSI Floating ext \ *G r3 is the radian angle whose tangent is r1/r2. The result is between ±pi \ ** with the same sign as r2. If r1 and r2 are both zero then r3 is ±zero. --- 1210,1214 ---- float; ! code FATAN2 ( fs: r1 r2 -- r3 ) \ ANSI Floating ext \ *G r3 is the radian angle whose tangent is r1/r2. The result is between ±pi \ ** with the same sign as r2. If r1 and r2 are both zero then r3 is ±zero. *************** *** 1227,1231 **** \ *N Logarithmic functions ! code FLN ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the natural logarithm of r1. If r1 is ±0 then r2 is -infinity. If r1 \ ** is infinity then r2 is infinity. If r1 is less than zero then r2 is a NAN. --- 1224,1228 ---- \ *N Logarithmic functions ! code FLN ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the natural logarithm of r1. If r1 is ±0 then r2 is -infinity. If r1 \ ** is infinity then r2 is infinity. If r1 is less than zero then r2 is a NAN. *************** *** 1237,1241 **** float; ! code FLNP1 ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the natural logarithm of the quantity r1 plus one. If r1 is -1.0 then \ ** r2 is -infinity. If r1 is infinity then r2 is infinity. If r1 is less than --- 1234,1238 ---- float; ! code FLNP1 ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the natural logarithm of the quantity r1 plus one. If r1 is -1.0 then \ ** r2 is -infinity. If r1 is infinity then r2 is infinity. If r1 is less than *************** *** 1267,1271 **** L$2: float; ! code FLOG ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the logarithm to base 10 of r1. If r1 is ±0 then r2 is -infinity. If r1 \ ** is infinity then r2 is infinity. If r1 is less than zero then r2 is a NAN. --- 1264,1268 ---- L$2: float; ! code FLOG ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the logarithm to base 10 of r1. If r1 is ±0 then r2 is -infinity. If r1 \ ** is infinity then r2 is infinity. If r1 is less than zero then r2 is a NAN. *************** *** 1279,1283 **** \ *N Exponential functions ! code FEXP ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G Raise e to the power r1, giving r2. fstack-check_1 --- 1276,1280 ---- \ *N Exponential functions ! code FEXP ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G Raise e to the power r1, giving r2. fstack-check_1 *************** *** 1309,1313 **** float; ! code FEXPM1 ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G Raise e to the power r1 and subtract one, giving r2. \ *P This function allows accurate computation when its arguments are close to zero, and --- 1306,1310 ---- float; ! code FEXPM1 ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G Raise e to the power r1 and subtract one, giving r2. \ *P This function allows accurate computation when its arguments are close to zero, and *************** *** 1365,1369 **** L$2: float; ! : f** ( fs: r1 r2 -- r3 ) \ ANSI Floating ext \ *G Raise r1 to the power r2, giving the product r3. FDUP FROUND FDUP F>S F- FDUP F0= --- 1362,1366 ---- L$2: float; ! : f** ( fs: r1 r2 -- r3 ) \ ANSI Floating ext \ *G Raise r1 to the power r2, giving the product r3. FDUP FROUND FDUP F>S F- FDUP F0= *************** *** 1372,1376 **** THEN ; ! : FALOG ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G Raise ten to the power r1, giving r2. f10.0 fswap f** ; --- 1369,1373 ---- THEN ; ! : FALOG ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G Raise ten to the power r1, giving r2. f10.0 fswap f** ; *************** *** 1387,1391 **** \ *N Hyperbolic functions ! : FSINH ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the hyperbolic sine of r1. fdup f0< --- 1384,1388 ---- \ *N Hyperbolic functions ! : FSINH ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the hyperbolic sine of r1. fdup f0< *************** *** 1394,1402 **** THEN ; ! : FCOSH ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the hyperbolic cosine of r1. fabs fexp fdup 1/f f+ f2/ ; ! : FTANH ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the hyperbolic tangent of r1, |r2| <= 1. fdup fabs f1.0 f< --- 1391,1399 ---- THEN ; ! : FCOSH ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the hyperbolic cosine of r1. fabs fexp fdup 1/f f+ f2/ ; ! : FTANH ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the hyperbolic tangent of r1, |r2| <= 1. fdup fabs f1.0 f< *************** *** 1411,1415 **** \ *N Inverse hyperbolic functions ! code FASINH ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the number whose hyperbolic sine is r1. fstack-check_1 --- 1408,1412 ---- \ *N Inverse hyperbolic functions ! code FASINH ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the number whose hyperbolic sine is r1. fstack-check_1 *************** *** 1426,1430 **** float; ! code FACOSH ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the number whose hyperbolic cosine is r1. If r1 < 1.0 then r2 is a NAN. fstack-check_1 --- 1423,1427 ---- float; ! code FACOSH ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the number whose hyperbolic cosine is r1. If r1 < 1.0 then r2 is a NAN. fstack-check_1 *************** *** 1441,1445 **** float; ! : FATANH ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the number whose hyperbolic tangent is r1. IF |r1| > 1.0 then r2 is a NAN. fdup f1.0 f+ --- 1438,1442 ---- float; ! : FATANH ( fs: r1 -- r2 ) \ ANSI Floating ext \ *G r2 is the number whose hyperbolic tangent is r1. IF |r1| > 1.0 then r2 is a NAN. fdup f1.0 f+ *************** *** 2164,2171 **** : f^2 fdup f* ; - \ : f^x fswap fln f* fexp ; - \ synonym f** f^x - - \ : fsqr f0.5 f** ; synonym fsqr fsqrt deprecated --- 2161,2164 ---- *************** *** 2361,2366 **** \ changed to use the reset-stack-chain \ January 22nd, 2004 - 13:53 dbu ! : FLOAT-RESET-STACKS ( ?? -- ) \ reset stack ! finit ; reset-stack-chain chain-add FLOAT-RESET-STACKS --- 2354,2358 ---- \ changed to use the reset-stack-chain \ January 22nd, 2004 - 13:53 dbu ! ' finit alias FLOAT-RESET-STACKS ( ?? -- ) \ reset stack reset-stack-chain chain-add FLOAT-RESET-STACKS |