COS(3M) Last changed: 2-12-98
NAME
COS, DCOS, CCOS, CDCOS - Computes cosine
SYNOPSIS
UNICOS and UNICOS/mk systems:
COS ([X=]x)
DCOS ([X=]x)
CCOS ([X=]x)
UNICOS and IRIX systems:
CDCOS ([X=]x)
IMPLEMENTATION
UNICOS, UNICOS/mk and IRIX systems
STANDARDS
Fortran 90
CDCOS is a compiler extension to Fortran 90.
DESCRIPTION
COS is the generic function name. COS, DCOS, and CCOS are elemental
functions for the CF90 compiler.
A vector version of this intrinsic exists on UNICOS and UNICOS/mk
systems. On UNICOS/mk systems, the vector version of this intrinsic
is used when -h vector3 (C compiler) or -O vector3 or -O3 (Fortran
compiler) has been specified on the compiler command line.
These functions evaluate y = cos(x).
The entry point CDCOS is provided for support in other languages. It
is not recognized as an intrinsic function; therefore, you must use
the CDIR$ VFUNCTION directive to allow vectorization.
CF90
CDCOS is called implicitly by the Fortran 90 compiler as a result of a
generic COS call with a complex double-precision argument.
CAL Register Usage (Cray Research Systems Only)
Scalar COS: COS% (call-by-register)
on entry (S1) = argument
on exit (S1) = result
Vector COS: %COS% (call-by-register)
on entry (V1) = argument vector
on exit (V1) = result vector
Scalar DCOS: DCOS% (call-by-register)
on entry (S1) and (S2) = argument
on exit (S1) and (S2) = result
Vector DCOS: %DCOS% (call-by-register)
on entry (V1) and (V2) = argument vector
on exit (V1) and (V2) = result vector
Scalar CCOS: CCOS% (call-by-register)
on entry (S1) and (S2) = argument
on exit (S1) and (S2) = result
Vector CCOS: %CCOS% (call-by-register)
on entry (V1) and (V2) = argument vector
on exit (V1) and (V2) = result vector
Scalar CDCOS: CDCOS% (call-by-register)
on entry (S1), (S2), (S3), and (S4) = argument
on exit (S1), (S2), (S3), and (S4) = result
Vector CDCOS: %CDCOS% (call-by-register)
on entry (V1), (V2), (V3), and (V4) = argument vector
on exit (V1), (V2), (V3), and (V4) = result vector
Argument Range
COS:
25
|x| < 2
DCOS:
45
|x| < 2
25
On UNICOS/mk systems, |x| < 2
CCOS:
25 13
|x | < 2 , |x | < 2 * ln2
r i 25
On UNICOS/mk systems, |x| < 2 , |x | < 710.47586
i
CDCOS:
45 13
|x | < 2 , |x | < 2 * ln2
r i
NOTES
CDCOS is an outmoded routine for the CF90 compiler. Refer to the
Fortran Language Reference Manual, Volume 3, publication SR-3905, for
information about outmoded features and their preferred standard
alternatives.
The name of the COS, DCOS, and CCOS intrinsic can be passed as an
argument. The name of the CDCOS intrinsic cannot be passed as an
argument.
RETURN VALUES
COS returns the real cosine of its real argument.
DCOS returns the double-precision cosine of its double-precision
argument.
CCOS returns the complex cosine of its complex argument.
CDCOS returns the complex double-precision cosine of its complex
double-precision argument.
On CRAY T90 systems that support IEEE arithmetic, the following return
values occur:
25
COS(x) = NaN if |x| > 2
COS(x) = NaN if x = NaN
Additional entry points are available on IRIX systems. See the IRIX
man pages for details.
SEE ALSO
Intrinsic Procedures Reference Manual, publication SR-2138, for the
printed version of this man page.