Lines Matching defs:expected
88 static int testGetExponentCase(float f, int expected) {
93 Math.getExponent(f), expected);
95 Math.getExponent(minus_f), expected);
98 StrictMath.getExponent(f), expected);
100 StrictMath.getExponent(minus_f), expected);
107 static int testGetExponentCase(double d, int expected) {
112 Math.getExponent(d), expected);
114 Math.getExponent(minus_d), expected);
117 StrictMath.getExponent(d), expected);
119 StrictMath.getExponent(minus_d), expected);
339 static int testNextAfterCase(float start, double direction, float expected) {
343 float minus_expected = -expected;
346 Math.nextAfter(start, direction), expected);
351 StrictMath.nextAfter(start, direction), expected);
357 static int testNextAfterCase(double start, double direction, double expected) {
362 double minus_expected = -expected;
365 Math.nextAfter(start, direction), expected);
370 StrictMath.nextAfter(start, direction), expected);
382 * result in the last column is expected.
454 * result in the last column is expected.
527 * expected result.
565 * expected result.
604 * expected result.
640 * expected result.
939 static int testScalbCase(float value, int scale_factor, float expected) {
944 Math.scalb(value, scale_factor), expected);
948 Math.scalb(-value, scale_factor), -expected);
952 StrictMath.scalb(value, scale_factor), expected);
956 StrictMath.scalb(-value, scale_factor), -expected);
1115 // 2. When rounding first occurs in the expected product, it
1118 // Halving expected after rounding happends to give the same
1120 float expected = Float_MAX_VALUEmm *0.5f;
1122 failures+=testScalbCase(Float_MAX_VALUEmm, i, expected);
1124 expected *= 0.5f;
1134 expected = 0x1.00001p-129f;
1139 expected);
1146 static int testScalbCase(double value, int scale_factor, double expected) {
1151 Math.scalb(value, scale_factor), expected);
1155 Math.scalb(-value, scale_factor), -expected);
1159 StrictMath.scalb(value, scale_factor), expected);
1163 StrictMath.scalb(-value, scale_factor), -expected);
1322 // 2. When rounding first occurs in the expected product, it
1325 // Halving expected after rounding happends to give the same
1327 double expected = Double_MAX_VALUEmm *0.5f;
1329 failures+=testScalbCase(Double_MAX_VALUEmm, i, expected);
1331 expected *= 0.5;
1341 expected = 0x0.2000000000001P-1022;
1345 expected);
1358 static int testUlpCase(float f, float expected) {
1363 Math.ulp(f), expected);
1365 Math.ulp(minus_f), expected);
1367 StrictMath.ulp(f), expected);
1369 StrictMath.ulp(minus_f), expected);
1373 static int testUlpCase(double d, double expected) {
1378 Math.ulp(d), expected);
1380 Math.ulp(minus_d), expected);
1382 StrictMath.ulp(d), expected);
1384 StrictMath.ulp(minus_d), expected);
1422 float expected;
1426 expected = FpUtils.scalb(1.0f, i - (FloatConsts.SIGNIFICAND_WIDTH-1));
1428 failures += testUlpCase(po2, expected);
1442 failures += testUlpCase(randFloat, expected);
1448 failures += testUlpCase(po2minus, expected/2.0f);
1527 double expected;
1531 expected = FpUtils.scalb(1.0, i - (DoubleConsts.SIGNIFICAND_WIDTH-1));
1533 failures += testUlpCase(po2, expected);
1547 failures += testUlpCase(randDouble, expected);
1553 failures += testUlpCase(po2minus, expected/2.0f);