https://bugs.llvm.org/show_bug.cgi?id=34851
Bug ID: 34851
Summary: Gross error in floating-point calculation
Product: clang
Version: 4.0
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangb...@nondot.org
Reporter: tyde...@tybor.com
CC: llvm-bugs@lists.llvm.org
This code
#include <stdio.h>
#define DEN 3.645199531882474602528e-4951L
int main(void){
static float f = DEN*DEN;
static double d = DEN*DEN;
static long double ld = DEN*DEN;
printf("DEN=%Lg, f=%g, d=%g, ld=%Lg\n", DEN, f, d, ld);
return 0;
}
prints 'inf' instead of the expected '0.0' for f, d, and ld.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs