< prev index next >

test/java/lang/Math/PowTests.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 21,31 **** * questions. */ /* * @test ! * @bug 4984407 5033578 * @summary Tests for {Math, StrictMath}.pow * @author Joseph D. Darcy */ public class PowTests { --- 21,31 ---- * questions. */ /* * @test ! * @bug 4984407 5033578 8134795 * @summary Tests for {Math, StrictMath}.pow * @author Joseph D. Darcy */ public class PowTests {
*** 86,134 **** --- 86,152 ---- double testData[] = { Double.NEGATIVE_INFINITY, /* > -oo */ -Double.MAX_VALUE, /**/ (double)Long.MIN_VALUE, /**/ (double) -((1L<<53)+2L), + -0x1.0p65, + -0x1.0000000000001p64, + -0x1.0p64, /**/ (double) -((1L<<53)), /**/ (double) -((1L<<53)-1L), /**/ -((double)Integer.MAX_VALUE + 4.0), /**/ (double)Integer.MIN_VALUE - 1.0, /**/ (double)Integer.MIN_VALUE, /**/ (double)Integer.MIN_VALUE + 1.0, + -0x1.0p31 + 2.0, + -0x1.0p31 + 1.0, + -0x1.0000000000001p31, + -0x1.0p31, /**/ -Math.PI, /**/ -3.0, /**/ -Math.E, /**/ -2.0, /**/ -1.0000000000000004, /* < -1.0 */ -1.0000000000000002, // nextAfter(-1.0, -oo) -1.0, /* > -1.0 */ -0.9999999999999999, // nextAfter(-1.0, +oo) /* > -1.0 */ -0.9999999999999998, + -0x1.fffffp-1, + -0x1.ffffeffffffffp-1, /**/ -0.5, /**/ -1.0/3.0, /* < 0.0 */ -Double.MIN_VALUE, -0.0, +0.0, /* > 0.0 */ +Double.MIN_VALUE, /**/ +1.0/3.0, /**/ +0.5, + +0x1.ffffeffffffffp-1, + +0x1.fffffp-1, /**/ +0.9999999999999998, /* < +1.0 */ +0.9999999999999999, // nextAfter(-1.0, +oo) +1.0, /* > 1.0 */ +1.0000000000000002, // nextAfter(+1.0, +oo) /**/ +1.0000000000000004, /**/ +2.0, /**/ +Math.E, /**/ +3.0, /**/ +Math.PI, + 0x1.0p31, + 0x1.0000000000001p31, + 0x1.0p31 + 1.0, + 0x1.0p31 + 2.0, /**/ -(double)Integer.MIN_VALUE - 1.0, /**/ -(double)Integer.MIN_VALUE, /**/ -(double)Integer.MIN_VALUE + 1.0, /**/ (double)Integer.MAX_VALUE + 4.0, /**/ (double) ((1L<<53)-1L), /**/ (double) ((1L<<53)), /**/ (double) ((1L<<53)+2L), + 0x1.0p64, + 0x1.0000000000001p64, + 0x1.0p65, /**/ -(double)Long.MIN_VALUE, /* < oo */ Double.MAX_VALUE, Double.POSITIVE_INFINITY, Double.NaN };
*** 255,265 **** // break; } } static boolean isFinite(double a) { ! return (0.0*a == 0); } /** * Return classification of argument: -1 for non-integers, 0 for * even integers, 1 for odd integers. --- 273,283 ---- // break; } } static boolean isFinite(double a) { ! return (0.0 * a == 0); } /** * Return classification of argument: -1 for non-integers, 0 for * even integers, 1 for odd integers.
< prev index next >