This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/15437] int vs const int computation: different answers


------- 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]