Trigonometric functions: Difference between revisions
Content deleted Content added
→{{header|J}}: Commentary clarified. |
→{{header|Perl}}: arcsin, arccos, arctan, and arccot rewrite. |
||
Line 152:
print tan($angle_radians).' '.tan(deg2rad($angle_degrees))."\n";
print cot($angle_radians).' '.cot(deg2rad($angle_degrees))."\n";
print
$acos = acos(cos($angle_radians));
print
$atan = atan(tan($angle_radians));
print $atan.' '.rad2deg($atan)."\n";
$acot = acot(cot($angle_radians));
print $acot.' '.rad2deg($acot)."\n";
Output:
Line 163 ⟶ 167:
1 1
1 1
0.785398163397448 45
0.785398163397448 45
0.785398163397448 45
0.785398163397448 45
</pre>
|