← Back to team overview

openjdk team mailing list archive

[Bug 1044857] Re: Wrong sine value with openjdk 7 server VM

 

fixed in quantal

** Changed in: openjdk-7 (Ubuntu)
       Status: New => Fix Released

** Also affects: openjdk-7 (Ubuntu Precise)
   Importance: Undecided
       Status: New

** Changed in: openjdk-7 (Ubuntu Precise)
   Importance: Undecided => Medium

** Changed in: openjdk-7 (Ubuntu Precise)
       Status: New => In Progress

** Changed in: openjdk-7 (Ubuntu Precise)
    Milestone: None => precise-updates

-- 
You received this bug notification because you are a member of OpenJDK,
which is subscribed to the bug report.
https://bugs.launchpad.net/bugs/1044857

Title:
  Wrong sine value with openjdk 7 server VM

Status in OpenJDK:
  Fix Released
Status in “openjdk-7” package in Ubuntu:
  Fix Released
Status in “openjdk-7” source package in Precise:
  In Progress

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.
  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(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/openjdk/+bug/1044857/+subscriptions


References