For negative long double arguments of huge magnitude, the expl() library
function sets the FPUs OVERFLOW exception flag, in addition to the UNDERFLOW and
INEXACT excpetion flags. This can easily be reproduced by passing a long double
of value -LDBL_MAX as argument. The result is +0.0 exactly, but the OVERFLOW
flag is set. In contrast, exp(-DBL_MAX) onlt sets the UNDERFLOW and INEXACT
floating point exception flags.
This report does not indicate what architecture was being used, which is important information since there are several different implementations of each libm function in glibc, especially for long double. Anyway, for current sources with x86 and x86_64 I can confirm the spurious OVERFLOW exception, but don't see the correct UNDERFLOW one.
Author: Joseph Myers <firstname.lastname@example.org>
Date: Wed Mar 28 09:32:12 2012 +0000
Avoid overflows from long double functions using __kernel_standard.