Lines Matching defs:doubleToLong
119 doubleToLong();
450 private static void doubleToLong() {
451 assertLongEquals(1L, $opt$noinline$DoubleToLong(1D));
452 assertLongEquals(0L, $opt$noinline$DoubleToLong(0D));
453 assertLongEquals(0L, $opt$noinline$DoubleToLong(-0D));
454 assertLongEquals(-1L, $opt$noinline$DoubleToLong(-1D));
455 assertLongEquals(51L, $opt$noinline$DoubleToLong(51D));
456 assertLongEquals(-51L, $opt$noinline$DoubleToLong(-51D));
457 assertLongEquals(0L, $opt$noinline$DoubleToLong(0.5D));
458 assertLongEquals(0L, $opt$noinline$DoubleToLong(0.4999999D));
459 assertLongEquals(0L, $opt$noinline$DoubleToLong(-0.4999999D));
460 assertLongEquals(0L, $opt$noinline$DoubleToLong(-0.5D));
461 assertLongEquals(42L, $opt$noinline$DoubleToLong(42.199D));
462 assertLongEquals(-42L, $opt$noinline$DoubleToLong(-42.199D));
463 assertLongEquals(2147483647L, $opt$noinline$DoubleToLong(2147483647D)); // 2^31 - 1
464 assertLongEquals(-2147483647L, $opt$noinline$DoubleToLong(-2147483647D)); // -(2^31 - 1)
465 assertLongEquals(-2147483648L, $opt$noinline$DoubleToLong(-2147483648D)); // -(2^31)
466 assertLongEquals(2147483648L, $opt$noinline$DoubleToLong(2147483648D)); // (2^31)
467 assertLongEquals(-2147483649L, $opt$noinline$DoubleToLong(-2147483649D)); // -(2^31 + 1)
468 assertLongEquals(9223372036854775807L, $opt$noinline$DoubleToLong(9223372036854775807D)); // 2^63 - 1
469 assertLongEquals(-9223372036854775808L, $opt$noinline$DoubleToLong(-9223372036854775807D)); // -(2^63 - 1)
470 assertLongEquals(-9223372036854775808L, $opt$noinline$DoubleToLong(-9223372036854775808D)); // -(2^63)
471 assertLongEquals(0L, $opt$noinline$DoubleToLong(Double.NaN));
472 assertLongEquals(9223372036854775807L, $opt$noinline$DoubleToLong(Double.POSITIVE_INFINITY));
473 assertLongEquals(-9223372036854775808L, $opt$noinline$DoubleToLong(Double.NEGATIVE_INFINITY));
672 static long $opt$noinline$DoubleToLong(double a){ if (doThrow) throw new Error(); return (long)a; }