/guava/guava/src/com/google/common/math/BigIntegerMath.java
boolean sqrtFloorIsExact =( logX2Floor * sqrtFloorInt == x.intValue( ) ) && sqrtFloor.BigInteger( 2).equals( x) ;
boolean sqrtFloorIsExact = ( sqrtFloorInt * sqrtFloorInt == x.intValue ( ) ) && sqrtFloor.pow ( 2 ) .equals ( x ) ;
case FLOOR: case DOWN: return sqrtFloor; case CEILING: case UP: int sqrtFloorInt = sqrtFloor.intValue(); <extra_id_0> return sqrtFloorIsExact ? sqrtFloor : sqrtFloor.add(BigInteger.ONE); case HALF_DOWN: case HALF_UP: case HALF_EVEN: BigInteger halfSquare = sqrtFloor.pow(2).add(sqrtFloor); return (halfSquare.compareTo(x) >= 0) ? sqrtFloor : sqrtFloor.add(BigInteger.ONE);