Bug 13841 - csqrt overflow and underflow
Summary: csqrt overflow and underflow
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: math (show other bugs)
Version: 2.15
: P2 normal
Target Milestone: ---
Assignee: Joseph Myers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-03-13 21:21 UTC by Joseph Myers
Modified: 2014-06-26 13:59 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 Joseph Myers 2012-03-13 21:21:36 UTC
The use of hypot in csqrt means it suffers from overflow and underflow in internal calculations.  On x86_64, csqrt (DBL_MAX + DBL_MAX * I) wrongly returns inf + 0 * I; for 0x1p-1074 + 0x1p-1074 * I, the result is 0 + NaN * I.  I'll send a patch.
Comment 1 Joseph Myers 2012-03-14 11:55:04 UTC
Fixed by:

commit e456826d7a539fb322bb9719297bd386eded8e32
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Mar 14 11:53:32 2012 +0000

    Fix csqrt overflow/underflow (bug 13841).