Trigonometric functions: Difference between revisions
Content added Content deleted
m (→{{header|REXX}}: added a couple of comments about when needing more than 1 million digits of '''pi''' or '''e'''. -- ~~~~) |
|||
Line 1,907: | Line 1,907: | ||
acos(-sqrt(2) / 2) = 135.0 |
acos(-sqrt(2) / 2) = 135.0 |
||
atan(sqrt(3)) = 60.0</pre> |
atan(sqrt(3)) = 60.0</pre> |
||
=={{header|Run BASIC}}== |
|||
<lang Runbasic>pi = 22/7 |
|||
tab$ = chr$(9) |
|||
radians = pi / 4 'a.k.a. 45 degrees |
|||
degrees = 45 * pi / 180 'convert 45 degrees to radians |
|||
PRINT " Sine: ";SIN(radians) ;tab$; SIN(degrees) 'sine |
|||
PRINT " Cosine: ";COS(radians) ;tab$; COS(degrees) 'cosine |
|||
PRINT "Tnagent: ";TAN(radians) ;tab$; TAN(degrees) 'tangent |
|||
print " Arcsin: ";ASN(radians) ;tab$; ASN(degrees) 'arcsin |
|||
print " Arccos: ";ACS(radians) ;tab$; ACS(degrees) 'arcsin |
|||
print " Arctan: ";ATN(radians) ;tab$; ATN(degrees) 'arcsin |
|||
print " TanAtn: ";ATN(TAN(radians));tab$;ATN(TAN(radians)) * 180 / pi 'tanatn |
|||
</lang> |
|||
=={{header|SAS}}== |
=={{header|SAS}}== |