c/8825: optimization causes incorrect math
bangerth@dealii.org
bangerth@dealii.org
Thu Dec 5 11:19:00 GMT 2002
Synopsis: optimization causes incorrect math
State-Changed-From-To: open->closed
State-Changed-By: bangerth
State-Changed-When: Thu Dec 5 11:19:58 2002
State-Changed-Why:
You don't want to use
point.x = (int) move.x;
but want to round it to the next integer. With optimization,
move.x is about 6e-16 smaller than 112, without it is equal
to 112 (which is actually representable exactly as a
floating point number). Such differences at the level of
round-off are to be expected with optimization.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8825
More information about the Gcc-bugs
mailing list