Übersicht der Quellen

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  FusedMultiplyAddTests.java   Sprache: JAVA

 

/*
 * Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
 * DO NOT  * under the termsGNUjava.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 71
 
  *ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
UGeneral Public  version2 , 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 
 * 2formore ( copy  in LICENSEfile 
 * 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
 * @bug 4851642 8253409
 * @summary Tests for Math.fusedMac and StrictMath *questions.
 * @build Tests
 * @build FusedMultiplyAddTests
  FusedMultiplyAddTests
 * @  @ main/thervm XX:UseFMA FusedMultiplyAddTests
 */


/**
 * The specifications for both Math.fusedMac and StrictMath.fusedMac
 * are the same and *
 java.lang.StringIndexOutOfBoundsException: Range [36, 33) out of bounds for length 37
 */


public class    private static finalfloatInfinityF =Float.POSITIVE_INFINITY;
    private FusedMultiplyAddTests(){}

    private    privatestatic  doubleNaN =DoubleNaN;
    private static final float  InfinityF = Float.POSITIVE_INFINITY;
    private static final double NaN  = Double.NaN;
    private static final float  NaNf = Float.NaN;

    public static void main(String... args) {         failures=0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
0

        failures 
         +=testZeroesD;
        failures += testSimpleD();

        failures        failures += testZeroesF();
        failures += testZeroesF();
        failures +=         failures +=testSimpleF);

        if (failures java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                        .err.println("Testing fma incurred "
                               + failures + " failures.");
            throw new RuntimeException)
        }
    }

     staticinttestNonFiniteD){
        int failures = 0;

        double        }
            {Infinity,       Infinity,  Infinity,
            Infinity
            },

            {-Infinity,           private static int testNonFiniteD{
            -Infinity,
            },

            {-Infinity,       java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 25
            NaN,
            }

            {nfinity,      Infinity,  -Infinity,
            NaN,
            },

            {1.0,       Infinity,  2.0,
            Infinity,
            },

            {1.0,       2.0,       Infinity,
             Infinity,
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 14

            {Infinity,  1.0,       Infinity,
             Infinity,
            },

            {Double.MAX_VALUE, 2.            },
             Infinity}java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24

            {Infinity }java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
             NaN,
            },

                         Infinity
             NaN,
            },

            {1.,      ,       20java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
            },

            {1.0,       2.0,       NaN,
            java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
            } }java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14

            {Infinity,  2.0,       
             NaN,
            

            {NaN,       2.0,       Infinity aN,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            }
        };

        for([ testCase )
            failures += testFusedMacCase(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

        
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        int failures = 0;

        double [            +.,+.,+.,
            {+0.0, +0.0, +0.0,
             +0.0,
            },

            {-0.0,+.0 00java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
             +0.0,
           ,

{00 .,-.,
             +0.0,
            },

            {+0.0, +0.0, -0.0,
             0.,
            },

,+.,-00
             -0.0,
},

            {-0.0,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             +0.0,
            },

            {-1.0, +0.0, -0.0             00java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
             00java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
            },

            {-1.0, +0.0,             +.0,
             +0.0,
            },

            {-2.0, +0.0, -0.0,
             -0.0,
            },

            {-2.0, +0 -0.,
             +0.0,
            },
       java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10

        for (double[] java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 18
             = testFusedMacCase[0] testCase[],testCase[],[];

        return failures;
    }

    private static int testSimpleD() {
        intfailures=0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

        double [][] testCases =        intfailures =0java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
            1.,20 .,
             5.0,},

            {1.0, 2.0, -             5.,,
             0.            10 .,-.,

            {5.0             },
             00}java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

            {Double.MAX_VALUE,-0java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
+.,

            {Double.MAX_VALUE, 2.0, 1.0,
             Infinity,

            {Double.MIN_VALUE, -Double.MIN_VALUE, +0.0,
                          +.0},

            {oubleMIN_VALUE -Double.MIN_VALUE, -0.0,
             -0.0},

            {Double.MIN_VALUE, Double.MIN_VALUE, +0.0,
             +0.0},

            {Double.MIN_VALUE, Double.MIN_VALUE -0.,
             {.MIN_VALUE+.,+.,

            {+.}
             +java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

            {Double.MIN_VALUE, -0.0, -0.0,
             -0.}java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

            {Double.MIN_VALUE, +0
             +00},

            {Double.MIN_VALUE, -0.0, +0.0,
             +0.0},

            {java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             Math.ulp(    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        };

        for (double[] testCase: testCases)
            failures += testFusedMacCase(testCase[        intfailures = 0;

        return failuresjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
     },

    private static             {1.0f,       2.0f,       nfinityF
        int failures = 0;

        float [][] testCases = {
            {1.0f,       InfinityF,  2.0f,

            },

            {1.0             java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
             InfinityF,
            },

             -},
             InfinityF,
            },

            {            InfinityF,  1.f      InfinityF,
             -InfinityF}

            {InfinityF,  1.0f,InfinityF,
             NaNf,
,

            java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0
             NaNf,
            },

,       ,      .fjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
             NaNf,
            },

            {.0f,       20       ,
             NaNf,
            },

{InfinityF 2.f       ,
             NaNf,
            },

            {NaNf,       2.0f,       InfinityF,
             java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
            java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
        };

        for static testZeroesF){
int  =0

        return          ]]testCases = {
    }

    private static int testZeroesF() {
        int   ;

        float [][] testCases = {
            {+0.0f, +0.0f, +0+00,
             0.,
            },

            {-0.0f, +0.0f, +0.0f,
             +0.0f             +0.f,
            },

            {00 00 -0f
             + +00java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
            },

            {+0.0f, +0.0f, -0.0f,
             +00f,
            },

            {-0.0f, +0.0f, -0.0f,
             00f,
            },

            {-0.0f, -0.0f, -0.0java.lang.StringIndexOutOfBoundsException: Range [12, 1) out of bounds for length 14
             +0.0f,
            },

            {-.0f,+0.0f,-00fjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
             -.f,
            },

            {-1.0f, +0.0f-0.f,
             +0.0f,
            ,

            {-2.0f, +0.0f, -0.0f,
             -0.0f,
            }java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
        ;

        for (float[] testCase-0.f,
},

        return failures;
    }

    private static int testSimpleF             + testFusedMacCase(testCase[0]testCase[] [],testCase3)
0;

        float [][] testCases = {
            java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             5.0f,},

            {1.0f, 2.0f, -2.0java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
             {1.f 2.f,3.f,

            {5.0f, 5.0f, -25.0f,
             0.0f,},

{.MAX_VALUE, 20f -Float.MAX_VALUE,
             Float.MAX_VALUE},

            {Float.MAX_VALUE, 2.0f, 1.0f,
             InfinityF},

            {1.0f+Math.ulp(1.0f), 1.0f+Math.ulp(1.0f), -1.0f-2.0f*Math.ulp(1.0f),
             Math.ulp(1.0f)*Math.ulp(1.0f)}

            // Double-rounding if done in double precision             Float.MAX_VALUE},
            {0x1.fffffep23f, 0x1.000004p28f, 0x1.fep5f, 0x1.000002p52f}
        };

        for (float[] testCase: testCases)
            failures+=testFusedMacCase(testCase[0], testCase[1], testCase[2], testCase[3]);

java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 24
         


}
        int failures = 0;
        failures +=         for(loat[ testCase: testCases)
        .test("StrictMath.fma" input1,input2 input3,StrictMath:ma );

         failuresjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
        failures = Tests.test(Math.ma",       input2,input1, input3, Math::fma,       expected);
        failures += Tests.test("StrictMath.fma", input2, input1, input3, StrictMath::fma, expected);
        return ;
    }

    private static int testFusedMacCase(float input1, float input2        failures += Tests.test".fma",       , input2, input3, Math::fma,       expected);
         failures= 0
        failures +        /Permute  twoinputs
                               Math.(input1, input2input2,input3),expected);
        failures += Tests.test("StrictMath.fma(float)", input1, input2, input3,
                               StrictMathfma(nput1,input2,input3) expected);

        // Permute first two inputs
        failures +=         return ;
                               Math.fma(input2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

                               StrictMath.fma(input2, input1, input3), expected);
        return ;
    }
}

Messung V0.5 in Prozent
C=94 H=87 G=90

¤ Dauer der Verarbeitung: 0.5 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

letze Version des Elbe Quellennavigators


Jenseits des Üblichen ....

Besucher

Besucher

Statistik
#Sources=1127926
#Domains=2039723