static int phi ( int n ) {
  float result = n ;
  for ( int p = 2 ;
  p * p <= n ;
  ++ p ) {
    if ( n % p == 0 ) {
      while ( n % p == 0 ) n /= p ;
      result *= ( 1.0 - ( 1.0 / ( float ) p ) ) ;
    }
  }
  if ( n > 1 ) result *= ( 1.0 - ( 1.0 / ( float ) n ) ) ;
  return ( int ) result ;
}

static int phi ( int n ) { float result = n ; for ( int p = 2 ; p * p <= n ; ++ p ) { if ( n % p == 0 ) { while ( n % p == 0 ) n /= p ; result *= ( 1.0 - ( 1.0 / ( float ) p ) ) ; } } if ( n > 1 ) result *= ( 1.0 - ( 1.0 / ( float ) n ) ) ; return ( int ) result ; }
(method_declaration (modifiers) type: (integral_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (integral_type) name: (identifier))) body: (block (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (identifier))) (for_statement init: (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) condition: (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (identifier)) update: (update_expression (identifier)) body: (block (if_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) consequence: (block (while_statement condition: (parenthesized_expression (binary_expression left: (binary_expression left: (identifier) right: (identifier)) right: (decimal_integer_literal))) body: (expression_statement (assignment_expression left: (identifier) right: (identifier)))) (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (decimal_floating_point_literal) right: (parenthesized_expression (binary_expression left: (decimal_floating_point_literal) right: (cast_expression type: (floating_point_type) value: (identifier)))))))))))) (if_statement condition: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) consequence: (expression_statement (assignment_expression left: (identifier) right: (parenthesized_expression (binary_expression left: (decimal_floating_point_literal) right: (parenthesized_expression (binary_expression left: (decimal_floating_point_literal) right: (cast_expression type: (floating_point_type) value: (identifier))))))))) (return_statement (cast_expression type: (integral_type) value: (identifier)))))