static float squareRoot ( int number , int precision ) {
  int start = 0 , end = number ;
  int mid ;
  double ans = 0.0 ;
  while ( start <= end ) {
    mid = ( start + end ) / 2 ;
    if ( mid * mid == number ) {
      ans = mid ;
      break ;
    }
    if ( mid * mid < number ) {
      start = mid + 1 ;
      ans = mid ;
    }
    else {
      end = mid - 1 ;
    }
  }
  double increment = 0.1 ;
  for ( int i = 0 ;
  i < precision ;
  i ++ ) {
    while ( ans * ans <= number ) {
      ans += increment ;
    }
    ans = ans - increment ;
    increment = increment / 10 ;
  }
  return ( float ) ans ;
}

static float squareRoot ( int number , int precision ) { int start = 0 , end = number ; int mid ; double ans = 0.0 ; while ( start <= end ) { mid = ( start + end ) / 2 ; if ( mid * mid == number ) { ans = mid ; break ; } if ( mid * mid < number ) { start = mid + 1 ; ans = mid ; } else { end = mid - 1 ; } } double increment = 0.1 ; for ( int i = 0 ; i < precision ; i ++ ) { while ( ans * ans <= number ) { ans += increment ; } ans = ans - increment ; increment = increment / 10 ; } return ( float ) ans ; }
(method_declaration (modifiers) type: (floating_point_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier)) (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal)) declarator: (variable_declarator name: (identifier) value: (identifier))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (decimal_floating_point_literal))) (while_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) body: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (decimal_integer_literal)))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))) (break_statement))) (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier))) consequence: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))) (expression_statement (assignment_expression left: (identifier) right: (identifier)))) alternative: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (decimal_floating_point_literal))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (identifier) right: (identifier)) update: (update_expression (identifier)) body: (block (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier))) body: (block (expression_statement (assignment_expression left: (identifier) right: (identifier))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (decimal_integer_literal)))))) (return_statement (cast_expression type: (floating_point_type) value: (identifier)))))