Bug 3406 - expf(x) gives infinity where correctly rounded result is finite
Summary: expf(x) gives infinity where correctly rounded result is finite
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: math (show other bugs)
Version: 2.3.4
: P2 minor
Target Milestone: ---
Assignee: Andreas Jaeger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-22 00:22 UTC by Myles Sussman
Modified: 2018-04-20 14:16 UTC (History)
1 user (show)

See Also:
Host: 2.6.9-34.ELsmp
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments
sample program that reproduces the problem (189 bytes, text/plain)
2006-10-22 00:26 UTC, Myles Sussman
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Myles Sussman 2006-10-22 00:22:33 UTC
glibc-2.3.4-2.19
gcc version 3.4.5 20051201 (Red Hat 3.4.5-2)

The attached sample program takes expf(x) and float(exp(x)) for a number x 
such that the exponential is ALMOST +INF in 32-bit floating point. expf(x) 
returns (incorrectly) INF, where float(exp(x)) is finite.
Comment 1 Myles Sussman 2006-10-22 00:26:36 UTC
Created attachment 1383 [details]
sample program that reproduces the problem

Program output:


 x is 88.7220001220703125
  expf(x) is inf
  exp(x)  is 339996993417815084460509669606173966336
Comment 2 Joseph Myers 2008-02-11 20:52:12 UTC
Patch submitted: http://sourceware.org/ml/libc-alpha/2008-02/msg00011.html
Comment 3 Ulrich Drepper 2008-05-11 17:49:52 UTC
Fixed in cvs.