Bug 143279 - x86_64 ecvt() returns "inf" for valid denormalized doubles
Summary: x86_64 ecvt() returns "inf" for valid denormalized doubles
Alias: None
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc   
(Show other bugs)
Version: 3.0
Hardware: x86_64
OS: Linux
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2004-12-17 23:40 UTC by Jason Baietto
Modified: 2007-11-30 22:07 UTC (History)
1 user (show)

Fixed In Version: RHBA-2005-096
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-05-18 14:00:00 UTC
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
Red Hat Product Errata RHBA-2005:096 normal SHIPPED_LIVE glibc bug fix update 2005-06-09 04:00:00 UTC
Red Hat Product Errata RHSA-2005:256 high SHIPPED_LIVE Low: glibc security update 2005-05-18 04:00:00 UTC
Sourceware 725 None None None Never

Description Jason Baietto 2004-12-17 23:40:24 UTC
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 09:51:39 UTC
Fix queued for RHEL3 U5 and RHEL4 U1.

Comment 4 Jakub Jelinek 2004-12-23 21:15:26 UTC
Fix added to glibc-2.3.2-95.31, for the time being available from

Comment 7 Tim Powers 2005-05-18 14:00:00 UTC
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.