static void cal_sin ( float n ) {
  float accuracy = ( float ) 0.0001 , denominator , sinx , sinval ;
  n = n * ( float ) ( 3.142 / 180.0 ) ;
  float x1 = n ;
  sinx = n ;
  sinval = ( float ) sin ( n ) ;
  int i = 1 ;
  do {
    denominator = 2 * i * ( 2 * i + 1 ) ;
    x1 = - x1 * n * n / denominator ;
    sinx = sinx + x1 ;
    i = i + 1 ;
  }
  while ( accuracy <= sinval - sinx ) ;
  System . out . println ( sinx ) ;
}

static void cal_sin ( float n ) { float accuracy = ( float ) 0.0001 , denominator , sinx , sinval ; n = n * ( float ) ( 3.142 / 180.0 ) ; float x1 = n ; sinx = n ; sinval = ( float ) sin ( n ) ; int i = 1 ; do { denominator = 2 * i * ( 2 * i + 1 ) ; x1 = - x1 * n * n / denominator ; sinx = sinx + x1 ; i = i + 1 ; } while ( accuracy <= sinval - sinx ) ; System . out . println ( sinx ) ; }
(method_declaration (modifiers) type: (void_type) name: (identifier) parameters: (formal_parameters (formal_parameter type: (floating_point_type) name: (identifier))) body: (block (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (cast_expression type: (floating_point_type) value: (decimal_floating_point_literal))) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier)) declarator: (variable_declarator name: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (identifier) right: (cast_expression type: (floating_point_type) value: (parenthesized_expression (binary_expression left: (decimal_floating_point_literal) right: (decimal_floating_point_literal))))))) (local_variable_declaration type: (floating_point_type) declarator: (variable_declarator name: (identifier) value: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (identifier))) (expression_statement (assignment_expression left: (identifier) right: (cast_expression type: (floating_point_type) value: (method_invocation name: (identifier) arguments: (argument_list (identifier)))))) (local_variable_declaration type: (integral_type) declarator: (variable_declarator name: (identifier) value: (decimal_integer_literal))) (do_statement body: (block (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (parenthesized_expression (binary_expression left: (binary_expression left: (decimal_integer_literal) right: (identifier)) right: (decimal_integer_literal)))))) (expression_statement (assignment_expression left: (identifier) right: (binary_expression left: (binary_expression left: (binary_expression left: (unary_expression operand: (identifier)) right: (identifier)) right: (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))))) condition: (parenthesized_expression (binary_expression left: (identifier) right: (binary_expression left: (identifier) right: (identifier))))) (expression_statement (method_invocation object: (field_access object: (identifier) field: (identifier)) name: (identifier) arguments: (argument_list (identifier))))))