Trigonometric functions: Difference between revisions
Content added Content deleted
(→{{header|BASIC}}: Forgot to give ATN an argument and changed for new requirements.) |
(→{{header|J}}: Commentary clarified.) |
||
Line 91: | Line 91: | ||
=={{header|J}}== |
=={{header|J}}== |
||
The [http://www.jsoftware.com/help/dictionary/dodot.htm circle functions] in J include trigonometric functions. Native operation is in radians, so |
The [http://www.jsoftware.com/help/dictionary/dodot.htm circle functions] in J include trigonometric functions. Native operation is in radians, so values in degrees involve conversion. |
||
Sine, cosine, and tangent of 45 degrees |
Sine, cosine, and tangent of a single angle, indicated as pi-over-four radians and as 45 degrees. |
||
>,:(1&o. ; 2&o. ; 3&o.) (4%~o. 1), 180 |
>,:(1&o. ; 2&o. ; 3&o.) (4%~o. 1), 180%~o. 45 |
||
0.707107 0.707107 |
0.707107 0.707107 |
||
0.707107 0.707107 |
0.707107 0.707107 |
||
1 1 |
1 1 |
||
Arcsine, arccosine, and arctangent of |
Arcsine, arccosine, and arctangent of one-half, in radians and degrees. |
||
>,:([ , 180p_1&*)&.> (_1&o. ; _2&o. ; _3&o.) 0.5 |
>,:([ , 180p_1&*)&.> (_1&o. ; _2&o. ; _3&o.) 0.5 |
||
0.523599 30 |
0.523599 30 |