Some sines values are wrong in java.
Using latest Ubuntu (12.04.1 32bits) and latest OpenJDK 7 (7~u3-2.1.1~pre1-1ubuntu3), I get wrong sine values with "server" VM. When using "cacao" VM, the results are correct.
Correct value is also returned when using Oracle JRE on the same machine and on the .class generated by OpenJDK.
No tests done in 64bits.
Steps to produce :
1/ Install Ubuntu 12.04.1 32bits, check 'upgrade' during install.
3/ create file Test.java with the following content :
public class Test {
public static void main(String[] args) {
System.out.println("" + Math.sin(1700000));
}
}
4/ compile Test.java to Test.class
javac Test.java
5/ run Test with server VM
java -server Test
It prints out a wrong answer :
1.6099231170917123E-29
5/ run Test with cacao VM
java -cacao Test
It prints out the right answer:
0.5711113510481804
Some sines values are wrong in java. 1.1~pre1- 1ubuntu3) , I get wrong sine values with "server" VM. When using "cacao" VM, the results are correct.
Using latest Ubuntu (12.04.1 32bits) and latest OpenJDK 7 (7~u3-2.
Correct value is also returned when using Oracle JRE on the same machine and on the .class generated by OpenJDK.
No tests done in 64bits.
Steps to produce :
1/ Install Ubuntu 12.04.1 32bits, check 'upgrade' during install.
2/ Install OpenJDK 7
sudo apt-get install openjdk-7-jdk
3/ create file Test.java with the following content : out.println( "" + Math.sin(1700000));
public class Test {
public static void main(String[] args) {
System.
}
}
4/ compile Test.java to Test.class
javac Test.java
5/ run Test with server VM 123E-29
java -server Test
It prints out a wrong answer :
1.6099231170917
5/ run Test with cacao VM
java -cacao Test
It prints out the right answer:
0.5711113510481804
ProblemType: Bug 1.1~pre1- 1ubuntu3 ature: Ubuntu 3.2.0-29. 46-generic- pae 3.2.24 generic- pae i686
DistroRelease: Ubuntu 12.04
Package: openjdk-7-jdk 7~u3-2.
ProcVersionSign
Uname: Linux 3.2.0-29-
ApportVersion: 2.0.1-0ubuntu12
Architecture: i386
Date: Sun Sep 2 01:03:54 2012
InstallationMedia: Ubuntu 12.04.1 LTS "Precise Pangolin" - Release i386 (20120817.3)
ProcEnviron:
TERM=xterm
PATH=(custom, no user)
LANG=en_US.UTF-8
SHELL=/bin/bash
SourcePackage: openjdk-7
UpgradeStatus: No upgrade log present (probably fresh install)