[gforth] / gforth / float.fs  

gforth: gforth/float.fs

Diff for /gforth/float.fs between version 1.2 and 1.3

version 1.2, Sat May 7 14:55:49 1994 UTC version 1.3, Tue May 31 07:26:23 1994 UTC
Line 36 
Line 36 
   
 : f.  ( r -- )  scratch represent 0=  : f.  ( r -- )  scratch represent 0=
   IF  2drop  scratch 3 min type  EXIT  THEN    IF  2drop  scratch 3 min type  EXIT  THEN
   IF  '- emit  THEN  dup >r 0<    IF  '- emit  THEN  dup >r 0<=
   IF  '0 emit    IF  '0 emit
   ELSE  scratch r@ min type  r@ precision - zeros  THEN    ELSE  scratch r@ min type  r@ precision - zeros  THEN
   '. emit r@ negate zeros    '. emit r@ negate zeros
   scratch r> 0 max /string 0 max -zeros type space ;    scratch r> 0 max /string 0 max -zeros type space ;
   \ I'm afraid this does not really implement ansi semantics wrt precision.
   \ Shouldn't precision indicate the number of places shown after the point?
   
 : fe. ( r -- )  scratch represent 0=  : fe. ( r -- )  scratch represent 0=
   IF  2drop  scratch 3 min type  EXIT  THEN    IF  2drop  scratch 3 min type  EXIT  THEN


Generate output suitable for use with a patch program
Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help