Anonymous user
Check Machin-like formulas: Difference between revisions
m
→{{header|REXX}}: changed extra digits and optimized the sqrt function, added a comment.
m (→{{header|REXX}}: added/changed whitespace and comments, simplified some functions.) |
m (→{{header|REXX}}: changed extra digits and optimized the sqrt function, added a comment.) |
||
Line 1,011:
Atan: procedure; parse arg x; if abs(x)=1 then return pi()/4*sign(x)
return Asin(x/sqrt(1+x**2))
sqrt: procedure; parse arg x;
parse value format(x,2,1,,0) 'E0' with
do k=j+5 to 0 by
numeric digits d; return (g/1)i /*make complex if X < 0.*/</lang>
'''output'''
<pre>
|