/* * Copyright (c) 2008, 2018, 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. * * This code is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * version 2 for more details (a copy is included in the LICENSE file that * accompanied this code). * * You should have received a copy of the GNU General Public License version * 2 along with this work; if not, write to the Free Software Foundation, * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. * * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ /* * @test * * @summary converted from VM Testbase jit/t/t052. * VM Testbase keywords: [jit, quick] * * @library /vmTestbase * /test/lib * @run driver jdk.test.lib.FileInstaller . . * @build jit.t.t052.t052 * @run driver ExecDriver --java jit.t.t052.t052 */ package jit.t.t052; import nsk.share.TestFailure; import nsk.share.GoldChecker; // This is a whittle-down of a tomcatv failure. At the time it found // its way in among the tests, it failed because of a failure correctly // to reverse the sense of an integer branch when swapping the operands. class t052 { public static final GoldChecker goldChecker = new GoldChecker( "t052" ); static double aa[][],dd[][],x[][],y[][], rx[][],ry[][],d[][]; static double s1alt,alfa,relfa,eps,h,rel; static int lmax; static int N; static int i1p,j1p,i2m,j2m,ll,ixcm,jxcm,iycm,jycm,irxm,jrxm; static int irym,jrym,m,ip,im,jp,jm; static double dxcm,dycm,rxm,rym,xx,yx,xy,yy,a,b,c,qi,qj; static double pxx,pyy,qxx,qyy,pxy,qxy; public static void main (String args[]) { int i,j,l,k; double abx,aby,dmax,r; N = 3; s1alt = 0.0; alfa = 0.1; relfa = 0.98; lmax = 1; eps = 0.5e-7; h = 1.0/(N-1); rel = 2.0/relfa; t052.goldChecker.println(); t052.goldChecker.println("init"); t052.goldChecker.println(N); t052.goldChecker.println(s1alt); t052.goldChecker.println(alfa); t052.goldChecker.println(relfa); t052.goldChecker.println(lmax); t052.goldChecker.println(eps); t052.goldChecker.println(h); t052.goldChecker.println(rel); aa = new double [N][N]; dd = new double [N][N]; x = new double [N][N]; y = new double [N][N]; rx = new double [N][N]; ry = new double [N][N]; d = new double [N][N]; for(i=0;i= Math.abs(rxm)) { rxm = rx[i][j]; irxm = i; jrxm = j; } if (Math.abs(ry[i][j]) >= Math.abs(rym)) { rym = ry[i][j]; irym = i; jrym = j; } } } t052.goldChecker.println(); t052.goldChecker.println("Rxm, rym"); t052.goldChecker.println(rxm); t052.goldChecker.println(rym); for (i=i1p; i aby) ? abx : aby; // System.out.println(ll+" "+ixcm+" "+jxcm+" "+dxcm+" "+iycm+" "+jycm+" "+dycm+" "+irxm+" "+jrxm+" "+rxm+" "+irym+" "+jrym+" "+rym); t052.goldChecker.println(); t052.goldChecker.println(ll); t052.goldChecker.println(lmax); t052.goldChecker.println(dmax); t052.goldChecker.println(eps); } while ((ll < lmax) && (dmax > eps)); t052.goldChecker.check(); } }