Sun Studio 12: Fortran User's Guide

4.10 Intrinsics

f95 supports some intrinsic procedures that are extensions beyond the standard.

Table 4–4 Nonstandard Intrinsics

Name 

Definition 

Function Type 

Argument Types 

Arguments 

Notes 

COT

Cotangent 

real 

real 

([X=]x)

P, E 

DDIM

Positive difference 

double precision 

double precision 

([X=]x,[Y=]y)

P, E 

LEADZ

Get the number of leading 0 bits 

integer 

Boolean, integer, real, or pointer 

([I=]i)

NP, I 

POPCNT

Get the number of set bits 

integer 

Boolean, integer, real, or pointer 

([I=]i)

NP, I 

POPPAR

Calculate bit population parity 

integer 

Boolean, integer, real, or pointer 

([X=]x)

NP, I 

Notes:P: The name can be passed as an argument. NP: The name cannot be passed as an argument. E: External code for the intrinsic is called at run time. I: f95 generates inline code for the intrinsic procedure.

See the Fortran Library Reference for a more complete discussion of intrinsics, including those from Fortran 77 that are recognized by the Fortran 95 compiler.