Re: IEEE-FP 0.5.3
- From: mhx@xxxxxx (Marcel Hendrix)
- Date: Thu, 27 Aug 2009 22:53:01 +0200
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
.
- Follow-Ups:
- Re: IEEE-FP 0.5.3
- From: David N. Williams
- Re: IEEE-FP 0.5.3
- References:
- Re: IEEE-FP 0.5.3
- From: Andrew Haley
- Re: IEEE-FP 0.5.3
- Prev by Date: Re: Gforth 0.7.0 marker bug
- Next by Date: Re: IEEE-FP 0.5.3
- Previous by thread: Re: IEEE-FP 0.5.3
- Next by thread: Re: IEEE-FP 0.5.3
- Index(es):
Relevant Pages
|