This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/15437] int vs const int computation: different answers
- From: "bangerth at dealii dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 14 May 2004 18:24:03 -0000
- Subject: [Bug c/15437] int vs const int computation: different answers
- References: <20040514162247.15437.lani@oas.ca>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From bangerth at dealii dot org 2004-05-14 18:24 -------
I think the general answer here is that converting doubles to integers
is not a stable operation in the vicinity of the integer you expect. I
agree that this leads to a surprising result in your particular case, but
it would be just as easy to trigger with slightly more complex cases and
very hard to make the compiler stable against these kinds of things.
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15437