public void testCheckRoundingUnnnecessary_success() { MathPreconditions.checkRoundingUnnecessary(true); }
switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(rem == 0);
switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(rem == 0);
switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(isPowerOfTwo(x)); // fall through case DOWN: case FLOOR:
switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(isPowerOfTwo(x));
public void testCheckRoundingUnnecessary_failure() { try { MathPreconditions.checkRoundingUnnecessary(false); fail(); } catch (ArithmeticException expected) { } }
switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(sqrtFloor.pow(2).equals(x)); // fall through case FLOOR: case DOWN:
switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(isPowerOfTwo(x));
checkRoundingUnnecessary(floorCmp == 0);
switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(sqrtFloor.pow(2).equals(x)); // fall through case FLOOR: case DOWN:
switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(isPowerOfTwo(x));
switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(isPowerOfTwo(x));
checkRoundingUnnecessary(isMathematicalInteger(x)); return x;
switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(x == floorPow);
switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(x == floorPow);
switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(sqrtFloor * sqrtFloor == x); // fall through case FLOOR: case DOWN:
checkRoundingUnnecessary(guessSquared == x); return guess; case FLOOR:
switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(x == floorPow);
switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(x == floorPow);
switch (mode) { case UNNECESSARY: checkRoundingUnnecessary(isPowerOfTwo(x));