Re: IEEE-FP 0.5.3



Andrew Haley <andrew29@xxxxxxxxxxxxxxxxxxxxxxx> writes Re: IEEE-FP 0.5.3

Marcel Hendrix <mhx@xxxxxx> wrote:
[.. D>F ..]
I think especially the rounding part of this definition deviates
wildly from common implementation practice (even gForth is using
the fild instruction here) and as such will cause chaos.

I can't see the difference from fild. Can you be more specific,
please?

Gforth 0.7.0, Copyright (C) 1995-2008 Free Software Foundation, Inc.
Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license'
Type `bye' to exit

cr 9223371972430266300. 2dup d. d>f f>d d.
9223371972430266300 9223371972430266368 ok

cr 9223371972430266300. 2dup d. d>f f.
9223371972430266300 9223371972430270000. ok

A positive double number is transformed into a float that is nowhere
near "correctly rounded."

( on a system with bin80 floats, which is also using fild )
FORTH> cr 9223371972430266306. 2dup d. d>f f>d d.
9223371972430266306 9223371972430266306 ok

FORTH> cr 9223371972430266306. 2dup d. d>f f.
9223371972430266306 0.922337197243026631e19 ok

-marcel

.



Relevant Pages

  • Re: IEEE-FP 0.5.3
    ... >> the fild instruction here) and as such will cause chaos. ... > Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license' ... I actually verified this by doing it all in hex and rounding by ...
    (comp.lang.forth)
  • Re: First Attempt at Forth
    ... Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license' ... Type `bye' to exit ... Gforth 0.6.2-20060527, Copyright 1995-2006 Free Software Foundation, Inc. ...
    (comp.lang.forth)
  • Re: hardware errors, do C and Forth need different things in hardware?
    ... Forth need different things in hardware? ... Gforth 0.6.2, Copyright 1995-2003 Free Software Foundation, Inc. ... Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license' ... you *not* have the 1 on the stack before you call test. ...
    (comp.lang.forth)
  • Re: Question about TUCK
    ... 32bit Forth for Windows 95, 98, and NT ... 4,349 Words total in dictionaries ... Gforth 0.7.0, Copyright 1995-2008 Free Software Foundation, Inc. ... Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license' ...
    (comp.lang.forth)
  • Re: hardware errors, do C and Forth need different things in hardware?
    ... hardware errors, do C and Forth need different things in hardware? ... Gforth 0.6.2, Copyright 1995-2003 Free Software Foundation, Inc. ... Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license' ... Type `bye' to exit ...
    (comp.lang.forth)