--- gforth/float.fs 1994/05/07 14:55:49 1.2 +++ gforth/float.fs 1994/05/31 07:26:23 1.3 @@ -36,11 +36,13 @@ : f. ( r -- ) scratch represent 0= IF 2drop scratch 3 min type EXIT THEN - IF '- emit THEN dup >r 0< + IF '- emit THEN dup >r 0<= IF '0 emit ELSE scratch r@ min type r@ precision - zeros THEN '. emit r@ negate zeros 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= IF 2drop scratch 3 min type EXIT THEN