Trigonometric functions: Difference between revisions

Content added Content deleted
m (→‎{{header|Perl 6}}: only radians accepted)
Line 3,235: Line 3,235:


=={{header|Perl 6}}==
=={{header|Perl 6}}==
{{works with|Rakudo|#22 "Thousand Oaks"}}
{{works with|Rakudo|2016.01}}


<lang perl6>say sin(pi/3), ' ', sin 60, 'd'; # 'g' (gradians) and 1 (circles)
<lang perl6>say sin(pi/3);
say cos(pi/4), ' ', cos 45, 'd'; # are also recognized.
say cos(pi/4);
say tan(pi/6), ' ', tan 30, 'd';
say tan(pi/6);


say asin(sqrt(3)/2), ' ', asin sqrt(3)/2, 'd';
say asin(sqrt(3)/2);
say acos(1/sqrt 2), ' ', acos 1/sqrt(2), 'd';
say acos(1/sqrt 2);
say atan(1/sqrt 3), ' ', atan 1/sqrt(3), 'd';</lang>
say atan(1/sqrt 3);</lang>


=={{header|PL/I}}==
=={{header|PL/I}}==