From: George H. <geo...@us...> - 2006-02-01 11:45:14
|
Update of /cvsroot/win32forth/win32forth/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv969/win32forth/doc Modified Files: p-float.htm Log Message: gah: More Dexing (still work in progress) Index: p-float.htm =================================================================== RCS file: /cvsroot/win32forth/win32forth/doc/p-float.htm,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** p-float.htm 30 Jan 2006 13:58:10 -0000 1.4 --- p-float.htm 1 Feb 2006 11:44:48 -0000 1.5 *************** *** 103,106 **** --- 103,108 ---- </h3><pre><b><a name="0">code fpi ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the value 3.141596... on to the FP stack. + </p><pre><b><a name="0">code f0.0 ( FS: -- r ) \ W32F Floating extra + </a></b></pre><p>Push plus zero on to the FP stack. </p><pre><b><a name="0">code f1.0 ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the value 1.0 on to the FP stack. *************** *** 113,118 **** </p><pre><b><a name="0">code fLn2 ( fs: -- r ) \ W32F Floating extra </a></b></pre><p>Push the value of ln 2 (the natural logarithm). - </p><pre><b><a name="0"> f1.0 fconstant f0.0 ( FS: -- r ) \ W32F Floating extra - </a></b></pre><p>Push plus zero. </p><pre><b><a name="0"> f0.0 fconstant finf ( FS: -- r ) \ W32F Floating extra </a></b></pre><p>Push plus infinity. --- 115,118 ---- *************** *** 145,149 **** </p><pre><b><a name="0">code FROUND ( fs: f1 -- fs: f2 ) \ ANSI Floating </a></b></pre><p>Set rounding mode to round to nearest. ! </p><h3>Integer to float coversion </h3><pre><b><a name="0">code D>F ( d -- ) ( F: -- r ) \ ANSI Floating </a></b></pre><p>Convert double number to floating-point number. --- 145,149 ---- </p><pre><b><a name="0">code FROUND ( fs: f1 -- fs: f2 ) \ ANSI Floating </a></b></pre><p>Set rounding mode to round to nearest. ! </p><h3>Integer to float conversion </h3><pre><b><a name="0">code D>F ( d -- ) ( F: -- r ) \ ANSI Floating </a></b></pre><p>Convert double number to floating-point number. *************** *** 151,156 **** </a></b></pre><p>Convert floating-point number to double number. If the result would be too large to fit in a double number then <br /> -9223372036854775808 is returned. </p><h3>Comparison operators ! </h3><h3>Maths operators </h3><pre><b><a name="0">code F+ ( fs: r1 r2 -- r3 ) \ ANSI Floating </a></b></pre><p>Add r1 to r2. --- 151,190 ---- </a></b></pre><p>Convert floating-point number to double number. If the result would be too large to fit in a double number then <br /> -9223372036854775808 is returned. + </p><pre><b><a name="0">: s>f ( n -- ) ( fs: -- r ) \ W32F Floating extra + </a></b></pre><p>Convert the single number n to floating point number r. + </p><pre><b><a name="0">: f>s ( -- n ) ( fs: r -- ) \ W32F Floating extra + </a></b></pre><p>Convert the floating point number r to single number n. + </p><pre><b><a name="0">code FS>DS ( -- d ) ( f: r -- ) \ W32F Floating extra + </a></b></pre><p>Move floating point number bits to the data stack as a 64-bit float. + This function is for passing floats to DLLs. + </p><pre><b><a name="0">code SFS>DS ( -- float ) ( fs: r -- ) \ W32F Floating extra + </a></b></pre><p>Push the top of the float stack onto the data stack as a 32-bit float. + This function is for passing floats to DLLs. </p><h3>Comparison operators ! </h3><pre><b><a name="0">: F0= ( -- f ) ( fs: r -- ) \ ANSI Floating ! </a></b></pre><p>Return true if r equals ±0e0. Returns false for NAN. ! </p><pre><b><a name="0">: F0< ( -- f ) ( fs: r -- ) \ ANSI Floating ! </a></b></pre><p>Return true if r is less than ±0e0. Returns false for NAN. ! </p><pre><b><a name="0">: f0> ( -- f ) ( fs: r -- ) \ W32F Floating extra ! </a></b></pre><p>Return true if r is greater than ±0e0. Returns false for NAN. ! </p><pre><b><a name="0">: f= ( -- f ) ( fs: r1 r2 -- ) \ W32F Floating extra ! </a></b></pre><p>Return true if r1 equals r2. Returns false if either number is a NAN. ! </p><pre><b><a name="0">: F< ( -- f ) ( fs: r1 r2 -- ) \ ANSI Floating ! </a></b></pre><p>Return true if r1 is less than r2. Returns false if either number is a NAN. ! </p><pre><b><a name="0">: f> ( -- f ) ( fs: r1 r2 -- ) \ W32F Floating extra ! </a></b></pre><p>Return true if r1 is greater than r2. Returns false if either number is a NAN. ! </p><pre><b><a name="0">: f<= ( -- f ) ( fs: r1 r2 -- ) \ W32F Floating extra ! </a></b></pre><p>Return true if r1 is less than or equal to r2. Returns true if either number ! is a NAN. ! </p><pre><b><a name="0">: f>= ( -- f ) ( fs: r1 r2 -- ) \ W32F Floating extra ! </a></b></pre><p>Return true if r1 is greater than or equal to r2. Returns true if either number ! is a NAN. ! </p><pre><b><a name="0">: FMAX ( fs: r1 r2 -- r3 ) \ ANSI Floating ! </a></b></pre><p>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. ! </p><pre><b><a name="0">: FMIN ( fs: r1 r2 -- r3 ) \ ANSI Floating ! </a></b></pre><p>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. ! </p><h3>Arithmetic operators </h3><pre><b><a name="0">code F+ ( fs: r1 r2 -- r3 ) \ ANSI Floating </a></b></pre><p>Add r1 to r2. *************** *** 163,166 **** --- 197,206 ---- </p><pre><b><a name="0">code FNEGATE ( fs: r1 -- r2 ) \ ANSI Floating </a></b></pre><p>Reverse the sign of r1. + </p><pre><b><a name="0">code f2/ ( fs: r1 -- r2 ) \ W32F Floating extra + </a></b></pre><p>Multiply by 2. + </p><pre><b><a name="0">code f2* ( fs: r1 -- r2 ) \ W32F Floating extra + </a></b></pre><p>Divide by 2. + </p><pre><b><a name="0">: 1/f ( fs: r1 -- r2 ) \ W32F Floating extra + </a></b></pre><p>r2 is the reciprocal of r1. </p><h3>Trigonometric functions </h3><pre><b><a name="0">: FSIN ( f: r1 -- r2 ) \ ANSI Floating ext *************** *** 190,194 **** </h3><pre><b><a name="0">code FLNP1 ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>? error for x <= -1 ! </p><h3>Output conversion. </h3><pre><b><a name="0">: PRECISION ( -- u ) \ ANSI Floating ext </a></b></pre><p>Return the number of significant digits currently used by (F.), (FE.), (FS.), F., --- 230,243 ---- </h3><pre><b><a name="0">code FLNP1 ( fs: r1 -- r2 ) \ ANSI Floating ext </a></b></pre><p>? error for x <= -1 ! </p><h3>Exponential functions ! </h3><h3>Hyperbolic functions ! </h3><pre><b><a name="0">: FSINH ( f: r1 -- r2 ) \ ANSI Floating ext ! </a></b></pre><p>r2 is the hyperbolic sine of r1. ! </p><pre><b><a name="0">: FCOSH ( f: r1 -- r2 ) \ ANSI Floating ext ! </a></b></pre><p>r2 is the hyperbolic cosine of r1. ! </p><pre><b><a name="0">: FTANH ( f: r1 -- r2 ) \ ANSI Floating ext ! </a></b></pre><p>r2 is the hyperbolic tangent of r1, |r2| <= 1. ! </p><h3>Inverse hyperbolic functions ! </h3><h3>Output conversion. </h3><pre><b><a name="0">: PRECISION ( -- u ) \ ANSI Floating ext </a></b></pre><p>Return the number of significant digits currently used by (F.), (FE.), (FS.), F., |