http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56608
Bug #: 56608
Summary: built-in floor function returns false results when
build with -ffast-math
Classification: Unclassified
Product: gcc
Version: 4.7.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: [email protected]
ReportedBy: [email protected]
In some cases floor() seems to return 0 value even if its argument is larger
than 1. This happens when compiling with '-O3 -ffast-math'.
Attached is the smallest code I found, which reproduces the problem. The
comments in the code explain how to reproduces the problem. There is also an
example of how a small tweak hides the problem.
Udi