[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[Bug c++/29597] log expression returns different results when casting




------- Comment #2 from bangerth at dealii dot org  2006-10-26 06:39 -------
To be more concrete: (int)(expression) rounds down. So if your quotient
of logarithms happens to be computed to 5.999999999999999, then you
will get a result of 5 after casting to int. You should round results,
not just cast them.

W.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29597

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.



Reply to: