BigDecimal function ( int arg0 ) { int loc0 = arg0 + 5 ; BigDecimal loc1 = arctan ( 5 , loc0 ) ; BigDecimal loc2 = arctan ( 239 , loc0 ) ; BigDecimal loc3 = loc1 . multiply ( FOUR ) . subtract ( loc2 ) . multiply ( FOUR ) ; return loc3 . setScale ( arg0 , BigDecimal . ROUND_HALF_UP ) ; }
compute the value of pi to the specified number of digits after the decimal point . the value is computed using machin 's formula : pi/4 = 4arctan 1/5 - arctan 1/239 and a power series expansion of arctan x to sufficient precision . concode_field_sep BigDecimal result concode_elem_sep int roundingMode concode_elem_sep BigDecimal FOUR concode_elem_sep long serialVersionUID concode_elem_sep int digits concode_field_sep BigDecimal arctan concode_elem_sep BigDecimal getResult concode_elem_sep void execute