static float trapezoidal ( float a , float b , float n ) {
  float h = ( b - a ) / n ;
  float s = y ( a ) + y ( b ) ;
  for ( int i = 1 ;
  i < n ;
  i ++ ) s += 2 * y ( a + i * h ) ;
  return ( h / 2 ) * s ;
}

static float trapezoidal ( float a , float b , float n ) { float h = ( b - a ) / n ; float s = y ( a ) + y ( b ) ; for ( int i = 1 ; i < n ; i ++ ) s += 2 * y ( a + i * h ) ; return ( h / 2 ) * s ; }
(method_declaration (modifiers) type: (floating_point_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (floating_point_type) name: (identifier)) (formal_parameter type: (floating_point_type) name: (identifier)) (formal_parameter type: (floating_point_type) name: (identifier))) body: (block (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (identifier))) right: (identifier)))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (binary_expression left: (method_invocation name: (identifier) arguments: (argument_list (identifier))) right: (method_invocation name: (identifier) arguments: (argument_list (identifier)))))) (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: (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (decimal_integer_literal) right: (method_invocation name: (identifier) arguments: (argument_list (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))))))) (return_statement (binary_expression left: (parenthesized_expression (binary_expression left: (identifier) right: (decimal_integer_literal))) right: (identifier)))))