Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 11 Jul 2004 22:07:27 +0400 (MSD)
From:      Dmitry Morozovsky <marck@rinet.ru>
To:        Dimitry Andric <dimitry@andric.com>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: gcc strangeness
Message-ID:  <20040711220440.R84500@woozle.rinet.ru>
In-Reply-To: <115911306.20040711194031@andric.com>
References:  <20040711210219.J84500@woozle.rinet.ru> <115911306.20040711194031@andric.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 11 Jul 2004, Dimitry Andric wrote:

DA> > 1.000000 1.000 0
DA> > 2.000000 2.000 1
DA> > 3.000000 3.000 2
DA> > 4.000000 4.000 3
DA> > 5.000000 5.000 5
DA> > 6.000000 6.000 6
DA> > 7.000000 7.000 7
DA> > 8.000000 8.000 7
DA> > 9.000000 9.000 8
DA> > 9.999999 10.000 9
DA>
DA> Yes, this is completely normal if you use IEEE floating point, due to
DA> decimal <-> binary conversion and other accumulating rounding errors.
DA> In other words, floating point calculations will almost never be
DA> exact...
DA>
DA> This is not a gcc problem.  In fact, I can even reproduce your output
DA> under Windows using a Microsoft C compiler! :)

Wow, it's interesting for us to have exact step-by-step instructions for that!
;)

Sincerely,
D.Marck                                     [DM5020, MCK-RIPE, DM3-RIPN]
------------------------------------------------------------------------
*** Dmitry Morozovsky --- D.Marck --- Wild Woozle --- marck@rinet.ru ***
------------------------------------------------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040711220440.R84500>