Bug 15423

Summary: catan, catanh spurious underflows
Product: glibc Reporter: Joseph Myers <jsm28>
Component: mathAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal Flags: fweimer: security-
Priority: P2    
Version: 2.17   
Target Milestone: ---   
Host: Target:
Build: Last reconfirmed:

Description Joseph Myers 2013-04-30 21:22:41 UTC
catan and catanh can produce spurious underflow exceptions from squaring the real and imaginary parts of their arguments.  These in turn can lead to other spurious exceptions and inaccurate results.  Examples on x86_64: catan (1.0 + 0x1p-1020i) (spurious underflow), catan (0x1p-1020 + 1.0i) (spurious underflow and divide-by-zero), catan (0x1p-512 + 1.0i) (spurious underflow and overflow), catan (0x1.3p-536 - 1.0i) (spurious underflow, imaginary part of result is inaccurate, -185.9367... but should be -186.0240...).
Comment 1 Joseph Myers 2013-05-01 10:07:52 UTC
Fixed for 2.18 by:

commit 10de07f5fdd9eaf3a808d4461401f5b661095614
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed May 1 10:07:00 2013 +0000

    Fix catan, catanh spurious underflows (bug 15423).