This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Inconsistent results casting double to int on x86
- From: John Love-Jensen <eljay at adobe dot com>
- To: <dups41 at gmail dot com>, MSX to GCC <gcc-help at gcc dot gnu dot org>
- Date: Wed, 22 Mar 2006 15:14:00 -0600
- Subject: Re: Inconsistent results casting double to int on x86
Hi Andrew,
The two results differ because float-point numbers are not able to exactly
represent all possible real numbers.
Detailed information here...
http://docs.sun.com/source/806-3568/ncg_goldberg.html
HTH,
--Eljay