Strange bug/problem with floating point assignments

Per Lundberg per@nobolt.com
Tue May 6 14:09:00 GMT 2003


On Tue, 2003-05-06 at 15:12, Christian Ehrhardt wrote:
> Nope. The floating point constants you specify are not representable
> exactly in the IEEE floating point format.

Aha...   I see.  I feel kind of stupid.  ;-)

> Hence the rounding differences.
> See the section: ``Problems with floating point computations'' on
> http://gcc.gnu.org/bugs.html.

I understand.  Thank you for a very good answer!

I guess I have to store my numbers as integers in the future.  At least,
they can be trusted.  :-)

--
Best regards,

Per Lundberg / Capio ApS
Phone: +46-18-4186040
Fax: +46-18-4186049
Web: http://www.nobolt.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://gcc.gnu.org/pipermail/gcc-bugs/attachments/20030506/c1eea6b5/attachment.sig>


More information about the Gcc-bugs mailing list