Difference: FloatingPointUnit (21 vs. 22)

Revision 222022-11-05 - PeterSchmid

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
%DASHBOARD{ section="banner"
Line: 119 to 119
  f>s ( r -- n ) n is the single-cell signed-integer equivalent of the integer portion of r s>f ( n -- r ) r is the floating-point equivalent of the single-cell value n
Changed:
<
<
f>fx ( r -- x ) x is the fixed-point equivalent of the floating-point r fx>f ( x -- r ) r is the floating-point equivalent of the fixed-point x
>
>
f>x ( r -- x ) x is the fixed-point equivalent of the floating-point r x>f ( x -- r ) r is the floating-point equivalent of the fixed-point x
  pi ( -- r ) r is pi, approx. 3.14159274101257324 e ( -- r ) r is e, approx. 2.7182818
Line: 136 to 136
 
Deleted:
<
<
 

Words Using C Math Library

fsin    ( r1 -- r2 )       r2 is the sine of the radian angle r1

Added:
>
>
fcos ( r1 -- r2 ) r2 is the cosine of the radian angle r1 ftan ( r1 -- r2 ) r2 is the principal radian angle whose tangent is r1 fasin ( r1 -- r2 ) r2 is the principal radian angle whose sine is r1 facos ( r1 -- r2 ) r2 is the principal radian angle whose cosine is r1 fatan ( r1 -- r2 ) r2 is the principal radian angle whose tangent is r1

fsinh ( r1 -- r2 ) r2 is the hyperbolic sine of r1 fcosh ( r1 -- r2 ) r2 is the hyperbolic cosine of r1 ftanh ( r1 -- r2 ) r2 is the hyperbolic tangent of r1 fasinh ( r1 -- r2 ) r2 is the floating-point value whose hyperbolic sine is r1 facosh ( r1 -- r2 ) r2 is the floating-point value whose hyperbolic cosine is r1 fatanh ( r1 -- r2 ) r2 is the floating-point value whose hyperbolic tangent is r1

fceil ( r1 -- r2 ) return the smallest integral value that is not less than r1 ffloor ( r1 -- r2 ) Round r1 to an integral value using the "round toward negative infinity" rule, giving r2

fexp ( r1 -- r2 ) raise e to the power r1, giving r2. f** ( r1 r2 -- r3 ) raise r1 to the power r2, giving the product r3

fln ( r1 -- r2 ) r2 is the natural logarithm of r1 flog ( r1 -- r2 ) r2 is the base-ten logarithm of r1

 
Added:
>
>
 
Changed:
<
<

Fixed-Point Words

>
>

Fixed-Point Words

  Fixed-point numbers (s31.32) are stored ( n-comma n-whole ) and can be handled like signed double numbers. Because of the name conflict with the floating-point words I changed the names of the fixed-point word and use for fixed-point words x instead of f.
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback