summaryrefslogtreecommitdiff
path: root/sysdeps/powerpc/fpu/k_sinf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/powerpc/fpu/k_sinf.c')
-rw-r--r--sysdeps/powerpc/fpu/k_sinf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/sysdeps/powerpc/fpu/k_sinf.c b/sysdeps/powerpc/fpu/k_sinf.c
index 64df0c9142..e2850dfc2c 100644
--- a/sysdeps/powerpc/fpu/k_sinf.c
+++ b/sysdeps/powerpc/fpu/k_sinf.c
@@ -17,6 +17,7 @@
License along with the GNU C Library; see the file COPYING.LIB. If
not, see <http://www.gnu.org/licenses/>. */
+#include <float.h>
#include <math.h>
#include <fenv.h>
#include <math_private.h>
@@ -40,7 +41,10 @@ __kernel_sinf (float x, float y, int iy)
ix = __builtin_fabsf (x);
if (ix < twom27)
{ /* |x| < 2**-27 */
- __feraiseexcept (FE_INEXACT);
+ if (ix < FLT_MIN && ix != 0.0f)
+ __feraiseexcept (FE_UNDERFLOW|FE_INEXACT);
+ else
+ __feraiseexcept (FE_INEXACT);
return x;
}
z = x * x;