Difference: FloatingPointUnit (19 vs. 20)

Revision 202022-11-04 - PeterSchmid

Line: 1 to 1
 
META TOPICPARENT name="WebHome"
%DASHBOARD{ section="banner"
Line: 210 to 210
 fx>f ( d -- r ) r is the floating-point equivalent of the fixed-point d

pi ( -- r ) r is pi, approx. 3.14159274101257324

Added:
>
>
e ( -- r ) r is e, approx. 2.7182818
 
Changed:
<
<
fnumber (a # -- r u ) convert the numbered string to float r, on success u is 1, fail 0
>
>
fnumber (a # -- r u ) convert the specified string by a and # to float r, on success u is 1, otherwise 0
 >float (a # -- r ? ) convert the specified string by a and # to float r, on success flag is true (more robust)

f. ( r -- ) display, with a trailing space, the floating-point number r in fixed-point notation

Line: 229 to 230
 fx/ ( d1 d2 -- d3 ) divide d1 by d2, giving the quotient d3 fx. ( d -- ) display, with a trailing space, the fixed-point number d fx.n ( d n -- ) print a fixed-point number with n fractional digits (truncated)
Changed:
<
<
f#S ( n1 -- n2 ) Adds 32 comma-digits to number output f# ( n1 -- n2 ) Adds one comma-digit to number output
>
>
fx#S ( n1 -- n2 ) Adds 32 comma-digits to number output fx# ( n1 -- n2 ) Adds one comma-digit to number output
 
 
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