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]

Re: c/8825: optimization causes incorrect math


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


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