Bug 59826 - library functions give floating point exceptions
library functions give floating point exceptions
Status: CLOSED WONTFIX
Product: Red Hat Linux
Classification: Retired
Component: glibc (Show other bugs)
7.1
alpha Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-02-13 13:13 EST by Robert M. Riches Jr.
Modified: 2007-04-18 12:40 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-02-13 13:15:42 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
C program source (197 bytes, text/plain)
2002-02-13 13:14 EST, Robert M. Riches Jr.
no flags Details
compilation script that shows the problem (38 bytes, text/plain)
2002-02-13 13:14 EST, Robert M. Riches Jr.
no flags Details
compilation script that shows a workaround (45 bytes, text/plain)
2002-02-13 13:15 EST, Robert M. Riches Jr.
no flags Details

  None (edit)
Description Robert M. Riches Jr. 2002-02-13 13:13:29 EST
Description of Problem:
    The default math libraries give floating point exceptions
    when doing fairly ordinary things, such as exp(-709.0) and
    then using the result.

Version-Release number of selected component (if applicable):
    glibc-devel-2.2.4-19.3

How Reproducible:
    100%

Steps to Reproduce:
1. In a C program, do exp(-709.0) and then use the result.
   (Sample source code as an attachment.)
2. 
3. 

Actual Results:
    Floating exception

Expected Results:
    The result should be a usable FP number somewhere near
    or equal to zero.

Additional Information:
    It appears the exp() function is returning a denormalized
    number, and later use of this number causes an exception.
    I had seen this issue and worked around it by using -mieee
    in the Rainbow information retrieval package, either the
    Festival speech synthesis package or the Phoenix speech
    recognition package, and xlock (-mode invert).  However,
    on advice from experts on the axp-list mailing list, I now
    consider it a library bug.
Comment 1 Robert M. Riches Jr. 2002-02-13 13:14:12 EST
Created attachment 45563 [details]
C program source
Comment 2 Robert M. Riches Jr. 2002-02-13 13:14:57 EST
Created attachment 45565 [details]
compilation script that shows the problem
Comment 3 Robert M. Riches Jr. 2002-02-13 13:15:35 EST
Created attachment 45566 [details]
compilation script that shows a workaround
Comment 4 Jakub Jelinek 2002-02-13 15:02:20 EST
There is just one libm and is not multilibbed, so you really cannot have both
precise results for -mieee and flushing to zero for non-mieee at the same time.
I'd suggest using -mieee always (e.g. the whole RHL alpha distribution is
compiled that way), or before using return values from libm functions wrapping
them in some function which flushes them to zero.

Note You need to log in before you can comment on or make changes to this bug.