Trigonometric functions: Difference between revisions

Content deleted Content added
Add NetRexx implementation
Line 1,625: Line 1,625:
print( c( acos(C), acosd(C) ) )
print( c( acos(C), acosd(C) ) )
print( c( atan(T), atand(T) ) )</lang>
print( c( atan(T), atand(T) ) )</lang>

=={{header|RapidQ}}==
<lang RapidQ>$APPTYPE CONSOLE
$TYPECHECK ON

SUB pause(prompt$)
PRINT prompt$
DO
SLEEP .1
LOOP UNTIL LEN(INKEY$) > 0
END SUB

'MAIN
DEFDBL pi , radians , degrees , deg2rad
pi = 4 * ATAN(1)
deg2rad = pi / 180
radians = pi / 4
degrees = 45 * deg2rad

PRINT format$("%.6n" , SIN(radians)) + " " + format$("%.6n" , SIN(degrees))
PRINT format$("%.6n" , COS(radians)) + " " + format$("%.6n" , COS(degrees))
PRINT format$("%.6n" , TAN(radians)) + " " + format$("%.6n" , TAN(degrees))

DEFDBL temp = SIN(radians)
PRINT format$("%.6n" , ASIN(temp)) + " " + format$("%.6n" , ASIN(temp) / deg2rad)

temp = COS(radians)
PRINT format$("%.6n" , ACOS(temp)) + " " + format$("%.6n" , ACOS(temp) / deg2rad)

temp = TAN(radians)
PRINT format$("%.6n" , ATAN(temp)) + " " + format$("%.6n" , ATAN(temp) / deg2rad)

pause("Press any key to continue.")

END 'MAIN


=={{header|REBOL}}==
=={{header|REBOL}}==