Bug 60907 - Floating-point bug - possibly missing kernel patch??
Summary: Floating-point bug - possibly missing kernel patch??
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel
Version: 7.3
Hardware: alpha
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Beth Uptagrafft
QA Contact: Beth Uptagrafft
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-03-08 21:15 UTC by Need Real Name
Modified: 2007-04-18 16:40 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-03-18 17:12:41 UTC
Embargoed:


Attachments (Terms of Use)

Description Need Real Name 2002-03-08 21:15:44 UTC
Description of Problem:

I found what appears to be a floating-point bug as may be
demonstrated by the following Java program:

class MyFloatTest {

  static float flt = Float.MIN_VALUE;
  static double dbl = flt;

  static public void main(String s[])
  {
    MyFloatTest mt = new MyFloatTest();
    System.out.println(dbl+"(Double) "+flt+"(Float)");
  }
}

Float.MIN_VALUE is 1.40129846432481707e-45f.

On Tru64 Unix and an Alpha box running Linux-2.2.17-4 with
FP patches and glibc-2.1.95 I get the correct output viz.,

% java MyFloatTest
1.401298464324817E-45(Double) 1.4E-45(Float)

However, I get the following incorrect output on RedHat 7.2-beta2.

% java MyFloatTest
2.652494739E-315(Double) 1.4E-45(Float)

The following small C program demonstrates that this is not a java
implemetation issue.

#include <stdio.h>

int main()
{
  float val = 1.40129846432481707e-45f;
  double dbl = val;

  printf("val is %e(flt) %g(dbl)\n", val, val);
}

On the Alpha box running Linux-2.2.17-4 with FP patches and
glibc-2.1.95; compiled with gcc -mieee -o fltst fltst.c,
the output is

% ./fltst
val is 1.401298e-45(flt) 1.4013e-45(dbl)

but on RedHat 7.2-beta2 I get

% ./fltst
minval is 2.652495e-315(flt) 2.65249e-315(dbl)

The FP patches I have on the machine that gives the correct results
is available at
http://www.compaq.com/java/download/jdk_linux/linuxpatches.html

Thanks,

Bharadwaj

Comment 1 Beth Uptagrafft 2002-03-18 17:08:03 UTC
Moved to correct product.

Comment 2 Beth Uptagrafft 2002-04-03 21:57:46 UTC
fixed in next release.


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