CORDIC: Difference between revisions

100 bytes removed ,  11 months ago
m
→‎{{header|J}}: bugfix (partial)
m (→‎{{header|J}}: bugfix (partial))
Line 129:
 
CORDIC=: {{
'r d a'=. 12 12 0.5p1#:y
if. d do. alpha=. 0.5p1-a else. alpha=. a end.
(r{:: 1;1 _1)*cordic alpha
Line 136:
Task examples (cos is the left value in the result, argument is in radians):
 
<syntaxhighlight lang=J> CORDIC -9FIXME</syntaxhighlight>
0.92954 0.420445
CORDIC 0
1 0
CORDIC 1.5
0.103588 1.46074
CORDIC 6
0.405107 1.39209</syntaxhighlight>
 
=== Notes ===
6,962

edits