Math_exp.java revision 12651:6ef01bd40ce2
17955SN/A/* 27955SN/A * Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved. 37955SN/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 47955SN/A * 57955SN/A * This code is free software; you can redistribute it and/or modify it 67955SN/A * under the terms of the GNU General Public License version 2 only, as 77955SN/A * published by the Free Software Foundation. 87955SN/A * 97955SN/A * This code is distributed in the hope that it will be useful, but WITHOUT 107955SN/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 117955SN/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 127955SN/A * version 2 for more details (a copy is included in the LICENSE file that 137955SN/A * accompanied this code). 147955SN/A * 157955SN/A * You should have received a copy of the GNU General Public License version 167955SN/A * 2 along with this work; if not, write to the Free Software Foundation, 177955SN/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 187955SN/A * 197955SN/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 207955SN/A * or visit www.oracle.com if you need additional information or have any 217955SN/A * questions. 227955SN/A */ 237955SN/Apackage org.graalvm.compiler.jtt.lang; 247955SN/A 257955SN/Aimport org.junit.Ignore; 267955SN/Aimport org.junit.Test; 277955SN/A 287955SN/Aimport org.graalvm.compiler.jtt.JTTTest; 2912876Sdl 307955SN/A/* 317955SN/A */ 3212876Sdlpublic class Math_exp extends JTTTest { 337955SN/A 347955SN/A public static double test(double arg) { 3512876Sdl return Math.exp(arg); 367955SN/A } 377955SN/A 387955SN/A @Test 397955SN/A public void run0() { 407955SN/A runTest("test", java.lang.Double.NaN); 417955SN/A } 427955SN/A 437955SN/A @Test 447955SN/A public void run1() { 457955SN/A runTest("test", java.lang.Double.NEGATIVE_INFINITY); 467955SN/A } 477955SN/A 487955SN/A @Test 497955SN/A public void run2() { 507955SN/A runTest("test", java.lang.Double.POSITIVE_INFINITY); 517955SN/A } 527955SN/A 537955SN/A @Test 547955SN/A public void run3() { 5512876Sdl runTest("test", -1D); 567955SN/A } 5712876Sdl 587955SN/A @Test 597955SN/A public void run4() { 607955SN/A runTest("test", -0.0D); 617955SN/A } 627955SN/A 6312876Sdl @Test 647955SN/A public void run5() { 657955SN/A runTest("test", 0.0D); 667955SN/A } 677955SN/A 687955SN/A @Ignore("java.lang.AssertionError: expected:<2.718281828459045> but was:<2.7182818284590455>") 697955SN/A @Test 707955SN/A public void run6() { 717955SN/A runTest("test", 1.0D); 727955SN/A } 737955SN/A} 7412876Sdl