Bug 3407 - powf gives inaccurate results on x86_64
Summary: powf gives inaccurate results on x86_64
Status: RESOLVED DUPLICATE of bug 1161
Alias: None
Product: glibc
Classification: Unclassified
Component: math (show other bugs)
Version: 2.3.4
: P2 normal
Target Milestone: ---
Assignee: Andreas Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-22 00:40 UTC by Myles Sussman
Modified: 2018-04-20 14:16 UTC (History)
1 user (show)

See Also:
Host: 2.6.9-34.ELsmp x86_64
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
test program (334 bytes, text/plain)
2006-10-22 00:44 UTC, Myles Sussman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Myles Sussman 2006-10-22 00:40:33 UTC
The attached sample code gives inaccurate results on x86_64 compared to 32 bit 
where it works.

gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)
glibc-2.3.4-2.19

powf results fractional error is larger than 1 part in 1 million.
Comment 1 Myles Sussman 2006-10-22 00:44:13 UTC
Created attachment 1384 [details]
test program

OUTPUT on x86_64 system
-----------------------
x is 0.843334257602691650390625
y is -370
 pow(x,y)  is 2399359442378151177461170176
 powf(x,y) is 2399362098709297791636602880
 fractional error 1.1071e-06


------------------------------------


Output on 32 bit system (CORRECT!)
----------------------------------

x is 0.843334257602691650390625
y is -370
 pow(x,y)  is 2399359442378151177461170176
 powf(x,y) is 2399359442378151177461170176
 fractional error 0
Comment 2 Vincent Lefèvre 2009-09-24 08:12:03 UTC
Bug 1161 is also about powf inaccuracy on x86_64. Marking as dup.

*** This bug has been marked as a duplicate of 1161 ***