Bug 143279 - x86_64 ecvt() returns "inf" for valid denormalized doubles
x86_64 ecvt() returns "inf" for valid denormalized doubles
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc (Show other bugs)
x86_64 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2004-12-17 18:40 EST by Jason Baietto
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2005-096
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-05-18 10:00:00 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Sourceware 725 None None None Never
Red Hat Product Errata RHBA-2005:096 normal SHIPPED_LIVE glibc bug fix update 2005-06-09 00:00:00 EDT
Red Hat Product Errata RHSA-2005:256 high SHIPPED_LIVE Low: glibc security update 2005-05-18 00:00:00 EDT

  None (edit)
Description Jason Baietto 2004-12-17 18:40:24 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030922

Description of problem:
The x86_64 ecvt() function returns "inf" or "-inf" for valid
denormalized doubles.  The function works correctly on i686 systems
(same library version).  Both systems running RHEL3 update 2.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
Compile and run the following program on both i686 and x86_64 systems.

#include <stdio.h>
#include <stdlib.h>
#include <ieee754.h>

main() {
   char* s;
   int decpt, sign, ndigits=7;
   union ieee754_double D;
   D.ieee.exponent = 0; /* denormalized */
   D.ieee.negative = 0;
   D.ieee.mantissa0 = 0x0; /* MSB */
   D.ieee.mantissa1 = 0x1; /* LSB */
   printf("Input=%e\n", D.d);
   s = ecvt(D.d, ndigits, &decpt, &sign);
   printf("Output=%s, decpt=%d, sign=%d\n", s, decpt, sign);

Actual Results:  On an x86_64 system:

Output=inf, decpt=-309, sign=0

Expected Results:  On an i686 system:

Output=4940656, decpt=-323, sign=0

Additional info:
Comment 3 Jakub Jelinek 2004-12-23 04:51:39 EST
Fix queued for RHEL3 U5 and RHEL4 U1.
Comment 4 Jakub Jelinek 2004-12-23 16:15:26 EST
Fix added to glibc-2.3.2-95.31, for the time being available from
Comment 7 Tim Powers 2005-05-18 10:00:00 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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