1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-30 22:43:12 +03:00

Fix catan, catanh missing underflows (bug 15406).

This commit is contained in:
Joseph Myers
2013-04-26 19:26:22 +00:00
parent f0302940e7
commit 9457fd952c
9 changed files with 152 additions and 7 deletions

View File

@ -20,7 +20,7 @@
#include <complex.h>
#include <math.h>
#include <math_private.h>
#include <float.h>
__complex__ long double
__catanl (__complex__ long double x)
@ -83,6 +83,17 @@ __catanl (__complex__ long double x)
num = 4.0L * __imag__ x;
__imag__ res = 0.25L * __log1pl (num / den);
}
if (fabsl (__real__ res) < LDBL_MIN)
{
volatile long double force_underflow = __real__ res * __real__ res;
(void) force_underflow;
}
if (fabsl (__imag__ res) < LDBL_MIN)
{
volatile long double force_underflow = __imag__ res * __imag__ res;
(void) force_underflow;
}
}
return res;