Mercurial > hg > truffle
annotate test/compiler/6539464/Test.java @ 1346:47742b654fcb
6939731: JSR 292 Zero build fix after 6934494
Summary: The changes of 6934494 have broken the Zero build.
Reviewed-by: twisti
Contributed-by: Gary Benson <gbenson@redhat.com>
author | twisti |
---|---|
date | Wed, 31 Mar 2010 08:03:33 -0700 |
parents | 819880572f09 |
children | c18cbe5936b8 |
rev | line source |
---|---|
706
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
1 /* |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
2 * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
4 * |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
8 * |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
13 * accompanied this code). |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
14 * |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
18 * |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
20 * CA 95054 USA or visit www.sun.com if you need additional information or |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
21 * have any questions. |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
22 */ |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
23 |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
24 /** |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
25 * @test |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
26 * @bug 6539464 |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
27 * @summary Math.log() produces inconsistent results between successive runs. |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
28 * |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
29 * @run main/othervm -Xcomp -XX:CompileOnly=Test.main Test |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
30 */ |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
31 |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
32 public class Test { |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
33 static double log_value = 17197; |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
34 static double log_result = Math.log(log_value); |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
35 |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
36 public static void main(String[] args) throws Exception { |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
37 for (int i = 0; i < 1000000; i++) { |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
38 double log_result2 = Math.log(log_value); |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
39 if (log_result2 != log_result) { |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
40 throw new InternalError("Math.log produces inconsistent results: " + log_result2 + " != " + log_result); |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
41 } |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
42 } |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
43 } |
819880572f09
6539464: Math.log() produces inconsistent results between successive runs.
never
parents:
diff
changeset
|
44 } |