[LLVMbugs] [Bug 11406] New: floating-point constant expressions are incorrectly rounded
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Sat Nov 19 14:07:50 PST 2011
http://llvm.org/bugs/show_bug.cgi?id=11406
Bug #: 11406
Summary: floating-point constant expressions are incorrectly
rounded
Product: clang
Version: trunk
Platform: PC
OS/Version: FreeBSD
Status: NEW
Severity: normal
Priority: P
Component: Frontend
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: das at freebsd.org
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 7629
--> http://llvm.org/bugs/attachment.cgi?id=7629
fail.c
In the default floating-point rounding mode (IEEE round-to-nearest), halfway
cases are supposed to round to the nearest *EVEN* representable number, but in
clang, apparently they don't always do that.
The attached program prints 0x1.0000000000001p+0 when compiled with clang -O,
but it prints 0x1.0p+0 when compiled with gcc or clang -O0, or when 'd' is
declared volatile. 0x1.0p+0 is the correct answer.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list