CRE Programmer's Guide
Math Functions
Common Run-Time Environment (CRE) Programmer’s Guide—528146-004
7-7
Cos
Cos
The Cos functions return the cosine of an angle.
angle
is the angle, expressed in radians, who cosine is returned.
Return Value
The Cos functions return the cosine of angle. The cosine is in the range:
-1.0 less than or equal to cos(
angle ) less than or equal to 1.0
Cosh
The Cosh functions return a hyperbolic cosine.
number
is the number whose hyperbolic cosine is returned.
Return Value
The Cosh functions return the hyperbolic cosine of number. The value returned is:
exp(
number ) + exp( -number )
2
Considerations
An arithmetic fault occurs if an intermediate calculation causes an overflow.
REAL(32) PROC RTL_Cos_Real32_( angle );
REAL(32) angle; ! in TNS only
REAL(64) PROC RTL_Cos_Real64_( angle );
REAL(64) angle; ! in TNS only
REAL(32) PROC { CRE_Cosh_Real32_ } ( number );
{ RTL_Cosh_Real32_ }
REAL(32) number ; ! in TNS only
REAL(64) PROC { CRE_Cosh_Real64_ } ( number );
{ RTL_Cosh_Real64_ }
REAL(64) number ; ! in TNS only