← Back to team overview

openjdk team mailing list archive

[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(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

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 OpenJDK,
which is subscribed to openjdk-7 in Ubuntu.
https://bugs.launchpad.net/bugs/1044857

Title:
  Wrong sine value with openjdk 7 server VM

Status in “openjdk-7” package in Ubuntu:
  New

Bug description:
  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(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

  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)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/1044857/+subscriptions


Follow ups

References