Bug#350729: cacao: Incorrect result due to computations in extended precision on x86 (regression)

2006-02-01 Thread Stephan Michels
On 1/31/06, Vincent Lefevre [EMAIL PROTECTED] wrote:
 According to the Java specifications, computations must correspond
 to the IEEE-754 double precision, and the result is incorrect.

 Package cacao 0.93-4 did not have this problem:

 z = 9.007199254740994E15
 d = 0.0

Thank you for finding this bug.
I got a patch from Christian Thalinger and the problem should be
fixed in the next upload.

Stephan Michels.


___
pkg-java-maintainers mailing list
pkg-java-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-java-maintainers


Bug#350729: cacao: Incorrect result due to computations in extended precision on x86 (regression)

2006-01-31 Thread Vincent Lefevre
Package: cacao
Version: 0.94-1
Severity: normal

With the following program:

public class test {
public static void main(String[] args) throws Exception {
test t = new test();
t.doTest();
}

volatile double x, y, z, d;

public void doTest() {
x = 9007199254740994.0; /* 2^53 + 2 */
y = 1.0 - 1/65536.0;
z = x + y;
d = z - x;
System.out.println(z =  + z);
System.out.println(d =  + d);
}
}

I get on an x86 machine:

z = 9.007199254740996E15
d = 2.0

According to the Java specifications, computations must correspond
to the IEEE-754 double precision, and the result is incorrect.

Package cacao 0.93-4 did not have this problem:

z = 9.007199254740994E15
d = 0.0

For more information about this problem under Linux/x86 and various JVMs:

  http://www.vinc17.org/research/extended.html

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing'), (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.14.4-20051215
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)

Versions of packages cacao depends on:
ii  binutils 2.16.1cvs20060117-1 The GNU assembler, linker and bina
ii  classpath2:0.20-2clean room standard Java libraries
ii  classpath-common 2:0.20-2architecture independent files
ii  libc62.3.5-12GNU C Library: Shared libraries an
ii  libltdl3 1.5.22-2A system independent dlopen wrappe
ii  zlib1g   1:1.2.3-9   compression library - runtime

cacao recommends no packages.

-- no debconf information


___
pkg-java-maintainers mailing list
pkg-java-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-java-maintainers