The following remarks apply to all of the intrinsic function tables in this chapter.
The abbreviation DOUBLE stands for DOUBLE PRECISION.
An intrinsic that takes INTEGER arguments accepts INTEGER*2, INTEGER*4, or INTEGER*8.
INTEGER intrinsics that take INTEGER arguments return values of INTEGER type determined as follows - note that options -i2, -dbl, and -xtypemap may alter the default sizes of actual arguments:
mod sign dim max min and iand or ior xor ieor -- size of the value returned is the largest of the sizes of the arguments.
abs ishft lshift rshift lrshft ibset btest ivclr ishftc ibits -- size of the value returned is the size of the first argument.
int epbase epprec -- size of the value returned is the size of default INTEGER.
ephuge -- size of the value returned is the size of the default INTEGER, or the size of the argument, whichever is largest.
Options that change the default data sizes (see "Size and Alignment of Data Types " ) also change the way some intrinsics are used. For example, with -dbl in effect, a call to ZCOS with a DOUBLE COMPLEX argument will automatically become a call to CQCOS because the argument has been promoted to COMPLEX*32. The following functions have this capability:
aimag alog amod cabs ccbrt ccos cdabs cdcbrt cdcos cdexp cdlog cdsin cdsqrt cexp clog csin csqrt dabs dacos dacosd dasin dasind datan datand dcbrt dconjg dcos dcosd dcosh ddim derf derfc dexp dimag dint dlog dmod dnint dprod dsign dsin dsind dsinh dsqrt dtan dtand dtanh idnint iidnnt jidnnt zabs zcbrt zcos zexp zlog zsin zsqrt
The following functions permit arguments of an integer or logical type of any size:
and iand ieor iiand iieor iior inot ior jiand jieor jior jnot lrshft lshift not or rshift xor
(SPARC only) An intrinsic that is shown to return a default REAL, DOUBLE PRECISION, COMPLEX, or DOUBLE COMPLEX value will return the prevailing type depending on certain compilation options. (See "Size and Alignment of Data Types ".) For example, if compiled with -xtypemap=real:64,double:64:
A call to a REAL function returns REAL*8
A call to a DOUBLE PRECISION function returns REAL*8
A call to a COMPLEX function returns COMPLEX*16
A call to a DOUBLE COMPLEX function returns COMPLEX*16
Other options that alter the data sizes of default data types are -r8 and -dbl, which also promote DOUBLE to QUAD. The -xtypemap= option provides more flexibility than these older compiler options and is preferred.
A function with a generic name returns a value with the same type as the argument--except for type conversion functions, the nearest integer function, the absolute value of a complex argument, and others. If there is more than one argument, they must all be of the same type.
If a function name is used as an actual argument, then it must be a specific name.
If a function name is used as a dummy argument, then it does not identify an intrinsic function in the subprogram, and it has a data type according to the same rules as for variables and arrays.