Bug 16396

Summary: Math problem under IA-64
Product: [Retired] Red Hat Linux Reporter: Nathaniel Woods <nathan>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 7.1   
Target Milestone: ---   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2004-10-01 20:34:51 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Nathaniel Woods 2000-08-16 21:06:30 UTC
Take this C program:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

main()
{
     double d;

     d = 1.401298 * pow(10, -45);
     printf("d=%g\n", (double) (float) d);
}


One would expect that the output would be 1.401298e-45 or 0 if a float
cannot contain this number.  Instead, I get 2.65249e-315.  Whats up
with this?

Comment 1 Richard Henderson 2004-10-01 20:34:51 UTC
Works at least as of glibc-2.3.2-95.6.