Bug 15419 - PowerPC: spurious overflow for hypotf
Summary: PowerPC: spurious overflow for hypotf
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: math (show other bugs)
Version: 2.18
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-30 14:25 UTC by Adhemerval Zanella Netto
Modified: 2014-06-13 18:09 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adhemerval Zanella Netto 2013-04-30 14:25:28 UTC
The hypotf implementation for PowerPC (sysdeps/powerpc/fpu/e_hypotf.c) generates
spurious overflow exception for subnormal arguments. This is due it checks
if arg1/arg2 > 2^30 (arg1 > arg2) by using a FP division.

Since the double version of ieee sqrt function will be used to compute final
value, there is not need to argument reduction in such case. A possible fix
would be just to clean up the test and call ieee sqrt directly.

I will send a patch to libc-alpha with a fix.
Comment 1 Adhemerval Zanella Netto 2013-05-07 14:16:06 UTC
Fixed by commit 16e616a72f9ac247520c0c7da99b99e229facdf9.