CRE Programmer's Guide
Math Functions
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
7-21
Tan
Considerations
An arithmetic fault occurs if number is less than zero.
Example
REAL(64) r, s;
r := 25.0L0;
s := RTL_Sqrt_Real64_(r); ! s gets 5.0L0
Tan
The Tan functions return the tangent of an angle.
angle
is the angle, expressed in radians, whose tangent is returned.
Return Value
The Tan functions return the tangent of angle:
tan( angle ) = sin( angle )
cos( angle )
Considerations
tan(angle) is undefined if cos(angle) = 0.
Tanh
The Tanh functions return a hyperbolic tangent.
number
is the number whose hyperbolic tangent is returned.
REAL(32) PROC RTL_Tan_Real32_( angle );
REAL(32) angle; ! in TNS only
REAL(64) PROC RTL_Tan_Real64_( angle );
REAL(64) angle; ! in TNS only
REAL(32) PROC { CRE_Tanh_Real32_ } ( number );
{ RTL_Tanh_Real32_ }
REAL(32) number; ! in TNS only
REAL(64) PROC { CRE_Tanh_Real64_ } ( number );
{ RTL_Tanh_Real64_ }
REAL(64) number; ! in TNS only