Diff for /gforth/float.fs between versions 1.37 and 1.39

version 1.37, 2002/10/27 09:57:10 version 1.39, 2002/12/05 19:25:23
Line 72  DOES> ( -- r ) Line 72  DOES> ( -- r )
     \G floating-point stack.      \G floating-point stack.
     fp0 @ fp@ - [ 1 floats ] Literal / ;      fp0 @ fp@ - [ 1 floats ] Literal / ;
   
 : FLit ( -- r )  r> dup f@ float+ >r ;  
 : FLiteral ( compilation r -- ; run-time -- r ) \ float f-literal  : FLiteral ( compilation r -- ; run-time -- r ) \ float f-literal
     \G Compile appropriate code such that, at run-time, @i{r} is placed      \G Compile appropriate code such that, at run-time, @i{r} is placed
     \G on the (floating-point) stack. Interpretation semantics are undefined.      \G on the (floating-point) stack. Interpretation semantics are undefined.
     BEGIN  here cell+ dup faligned <>  WHILE  postpone noop  REPEAT      BEGIN  here cell+ cell+ dup faligned <>  WHILE  postpone noop  REPEAT
     postpone FLit  f, ;  immediate      postpone ahead here >r f, postpone then
       r> postpone literal postpone f@ ;  immediate
   
 &15 Value precision ( -- u ) \ float-ext  &15 Value precision ( -- u ) \ float-ext
 \G @i{u} is the number of significant digits currently used by  \G @i{u} is the number of significant digits currently used by
Line 222  set-current Line 222  set-current
         fnegate f~rel          fnegate f~rel
     THEN ;      THEN ;
   
 2e 53e f** fconstant fround-offset \ !! does f** work correctly?  1e 53 0 [do] f2* [loop] fconstant fround-offset \ 2^53
   
 : fround ( r1 -- r2 ) \ float f-round  : fround ( r1 -- r2 ) \ float f-round
 \G Round to nearest integral value.  Break ties with round-to-even.  \G Round to nearest integral value.  Break ties with round-to-even.

Removed from v.1.37  
changed lines
  Added in v.1.39


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>