Intel® Fortran Compiler

Developer Guide and Reference

ID 767251
Date 12/12/2025
Public
Document Table of Contents

COSPI

Elemental Intrinsic Function (Generic): Produces the cosine of x in half revolutions.

result = COSPI (x)

x

(Input) Must be of type real or complex. It must be in radians and is treated as modulo 2*pi.

Results

The result type and kind are the same as x.

The value is an approximation of the cosine of X. COSPI (x) is approximately equal to COS (X x π).

There are no specific names for this function.

Example

COSPI (1.0) has the approximate value -1.0.