Anonymous user
Trigonometric functions: Difference between revisions
Added PicoLisp
(→{{header|OCaml}}: typo) |
(Added PicoLisp) |
||
Line 827:
v = tanh(x); y = atanh(v); put skip list (y);
</lang>
=={{header|PicoLisp}}==
<lang PicoLisp>(load "@lib/math.l")
(de dtor (Deg)
(*/ Deg pi 180.0) )
(de rtod (Rad)
(*/ Rad 180.0 pi) )
(prinl
(format (sin (/ pi 4)) *Scl) " " (format (sin (dtor 45.0)) *Scl) )
(prinl
(format (cos (/ pi 4)) *Scl) " " (format (cos (dtor 45.0)) *Scl) )
(prinl
(format (tan (/ pi 4)) *Scl) " " (format (tan (dtor 45.0)) *Scl) )
(prinl
(format (asin (sin (/ pi 4))) *Scl) " " (format (rtod (asin (sin (dtor 45.0)))) *Scl) )
(prinl
(format (acos (cos (/ pi 4))) *Scl) " " (format (rtod (acos (cos (dtor 45.0)))) *Scl) )
(prinl
(format (atan (tan (/ pi 4))) *Scl) " " (format (rtod (atan (tan (dtor 45.0)))) *Scl) )</lang>
Output:
<pre>0.707107 0.707107
0.707107 0.707107
1.000000 1.000000
0.785398 44.999986
0.785398 44.999986
0.785398 44.999986</pre>
=={{header|Pop11}}==
|