public static BigInteger bigIntSqRootFloor ( BigInteger x ) throws IllegalArgumentException {
  if ( x . compareTo ( BigInteger . ZERO ) < 0 ) {
    throw new IllegalArgumentException ( "Negative argument." ) ;
  }
  if ( x == BigInteger . ZERO || x == BigInteger . ONE ) {
    return x ;
  }
  BigInteger two = BigInteger . valueOf ( 2L ) ;
  BigInteger y ;
  for ( y = x . divide ( two ) ;
  y . compareTo ( x . divide ( y ) ) > 0 ;
  y = ( ( x . divide ( y ) ) . add ( y ) ) . divide ( two ) ) ;
  return y ;
}

public static BigInteger bigIntSqRootFloor ( BigInteger x ) throws IllegalArgumentException { if ( x . compareTo ( BigInteger . ZERO ) < 0 ) { throw new IllegalArgumentException ( " Negative ▁ argument . " ) ; } if ( x == BigInteger . ZERO || x == BigInteger . ONE ) { return x ; } BigInteger two = BigInteger . valueOf ( 2L ) ; BigInteger y ; for ( y = x . divide ( two ) ; y . compareTo ( x . divide ( y ) ) > 0 ; y = ( ( x . divide ( y ) ) . add ( y ) ) . divide ( two ) ) ; return y ; }
(method_declaration (modifiers) type: (type_identifier) name: (identifier) parameters: (formal_parameters (formal_parameter type: (type_identifier) name: (identifier))) (throws (type_identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (field_access object: (identifier) field: (identifier)))) right: (decimal_integer_literal))) consequence: (block (throw_statement (object_creation_expression type: (type_identifier) arguments: (argument_list (string_literal)))))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))) right: (binary_expression left: (identifier) right: (field_access object: (identifier) field: (identifier))))) consequence: (block (return_statement (identifier)))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier) value: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (decimal_integer_literal))))) (local_variable_declaration type: (type_identifier) declarator: (variable_declarator name: (identifier))) (for_statement init: (assignment_expression left: (identifier) right: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) condition: (binary_expression left: (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier))))) right: (decimal_integer_literal)) update: (assignment_expression left: (identifier) right: (method_invocation object: (parenthesized_expression (method_invocation object: (parenthesized_expression (method_invocation object: (identifier) name: (identifier) arguments: (argument_list (identifier)))) name: (identifier) arguments: (argument_list (identifier)))) name: (identifier) arguments: (argument_list (identifier))))) (return_statement (identifier))))