[Bug 1044857] Re: Wrong sine value with openjdk 7 server VM
** Description changed: 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. + I'm posting this bug report from a vmware virtual machine, but this bug has been spotted on multiple non-virtual computers. In some cases, instead of returning a wrong value the JVM crashes. (see example here www.java-forum.org/allgemeine-java-themen/140418-java-vm-crash-math-sin-double.html) 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 : public class Test { -public static void main(String[] args) { - System.out.println( + Math.sin(170)); -} + public static void main(String[] args) { + System.out.println( + Math.sin(170)); + } } 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.573510481804 ProblemType: Bug DistroRelease: Ubuntu 12.04 Package: openjdk-7-jdk 7~u3-2.1.1~pre1-1ubuntu3 ProcVersionSignature: Ubuntu 3.2.0-29.46-generic-pae 3.2.24 Uname: Linux 3.2.0-29-generic-pae i686 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 + 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) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1044857 Title: Wrong sine value with openjdk 7 server VM To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/1044857/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1044857] Re: Wrong sine value with openjdk 7 server VM
-- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1044857 Title: Wrong sine value with openjdk 7 server VM To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/1044857/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1044857] [NEW] Wrong sine value with openjdk 7 server VM
Public bug reported: 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. 2/ Install OpenJDK 7 sudo apt-get install openjdk-7-jdk 3/ create file Test.java with the following content : public class Test { public static void main(String[] args) { System.out.println( + Math.sin(170)); } } 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.573510481804 ProblemType: Bug DistroRelease: Ubuntu 12.04 Package: openjdk-7-jdk 7~u3-2.1.1~pre1-1ubuntu3 ProcVersionSignature: Ubuntu 3.2.0-29.46-generic-pae 3.2.24 Uname: Linux 3.2.0-29-generic-pae i686 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) ** Affects: openjdk-7 (Ubuntu) Importance: Undecided Status: New ** Tags: apport-bug i386 java math openjdk precise running-unity -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1044857 Title: Wrong sine value with openjdk 7 server VM To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/1044857/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs