Skip to content. Skip to navigation

ICTP Portal

Sections
You are here: Home Manuals on-line PGI Compiler pgf77_ref PGF77 Workstation Reference Manual - A Intrinsics
Personal tools
Document Actions

PGF77 Workstation Reference Manual - A Intrinsics

<< << " border=0> >> > " border=0> Title Contents Index Home Help

A Intrinsics

This chapter specifies the pgf77 intrinsic functions. All the Fortran 77 intrinsics are supported and are detailed in the ANSI Fortran manual listed in the section "Related Publications," in the Preface.

Generic
Name
Functions
Number
of Args
Specific
Name
Type of
Argument
Type of
Result
IZEXT
Zero-Extend Function
1
IZEXT
LOGICAL*1
INTEGER*2

(Conversion Routine)


LOGICAL*2
INTEGER*2




INTEGER*2
INTEGER*2
ZEXT
Zero-Extend Function

JZEXT
LOGICAL*1
INTEGER*4

(Conversion Routine)


LOGICAL*2
INTEGER*4




LOGICAL*4
INTEGER*4




INTEGER*2
INTEGER*4




INTEGER*4
INTEGER*4
Generic
Name
Functions
Number
of Args
Specific
Name
Type of
Argument
Type of
Result
SQRT
Square Root
1
SQRT
REAL*4
REAL*4



DSQRT
REAL*8
REAL*8



CSQRT
COMPLEX*8
COMPLEX*8



CDSQRT
COMPLEX*16
COMPLEX*16
LOG
Natural
Logarithm
1
ALOG
REAL*4
REAL*4



DLOG
REAL*8
REAL*8



CLOG
COMPLEX*8
COMPLEX*8



CDLOG
COMPLEX*16
COMPLEX*16
LOG10
Common
Logarithm
1
ALOG10
REAL*4
REAL*4



DLOG10
REAL*8
REAL*8
EXP
Exponential
1
EXP
REAL*4
REAL*4



DEXP
REAL*8
REAL*8



CEXP
COMPLEX*8
COMPLEX*8



CDEXP
COMPLEX*16
COMPLEX*16
Generic
Name
Functions
Number
of Args
Specific
Name
Type of
Argument
Type of
Result
SIND
Sine(degree)
1
SIND
REAL*4
REAL*4



DSIND
REAL*8
REAL*8
COSD
Cos (degree)
1
COSD
REAL*4
REAL*4



DCOSD
REAL*8
REAL*8
TAND
Tan (degree)
1
TAND
REAL*4
REAL*4



DTAND
REAL*8
REAL*8
ASIND
ArcSine (degree)
1
ASIND
REAL*4
REAL*4



DASIND
REAL*8
REAL*8
ACOSD
ArcCosine (deg.)
1
ACOSD
REAL*4
REAL*4



DACOSD
REAL*8
REAL*8
ATAND
ArcTangent (deg.)
1
ATAND
REAL*4
REAL*4

Arc Tangent

DATAND
REAL*8
REAL*8
ATAN2D
ArcTangent (deg.)
2
ATAN2D
REAL*4
REAL*4



DATAN2D
REAL*8
REAL*8
SIN
Sine
1
SIN
REAL*4
REAL*4



DSIN
REAL*8
REAL*8



CSIN
COMPLEX*8
COMPLEX*8



CDSIN
COMPLEX*16
COMPLEX*16
COS
Cos
1
COS
REAL*4
REAL*4



DCOS
REAL*8
REAL*8



CCOS
COMPLEX*8
COMPLEX*8



CDCOS
COMPLEX*16
COMPLEX*16
TAN
Tangent
1
TAN
REAL*4
REAL*4



DTAN
REAL*8
REAL*8
ASIN
ArcSine
1
ASIN
REAL*4
REAL*4



DASIN
REAL*8
REAL*8
ACOS
ArcCosine
1
ACOS
REAL*4
REAL*4



DACOS
REAL*8
REAL*8
ATAN
ArcTangent
1
ATAN
REAL*4
REAL*4



DATAN
REAL*8
REAL*8
ATAN2
ArcTangent
2
ATAN2
REAL*4
REAL*4



DATAN2
REAL*8
REAL*8
SINH
Hyperbolic Sine
1
SINH
REAL*4
REAL*4



DSINH
REAL*8
REAL*8
COSH
Hyperbolic Cosine
1
COSH
REAL*4
REAL*4



DCOSH
REAL*8
REAL*8
TANH
Hyperbelic Tangent
1
TANH
REAL*4
REAL*4



DTANH
REAL*8
REAL*8
Generic
Name
Functions
Number
of Args
Specific
Name
Type of
Argument
Type of
Result
ABS
Absolute Value
1
IIABS
INTEGER*2
INTEGER*2



JIABS
INTEGER*4
INTEGER*4



KIABS
INTEGER*8
INTEGER*8



ABS
REAL*4
REAL*4



DABS
REAL*8
REAL*8



CABS
COMPLEX*8
COMPLEX*8



CDABS
COMPLEX*16
COMPLEX*16
IINT
Truncation
1

INTEGER*2
INTEGER*2




INTEGER*4
INTEGER*2




INTEGER*8
INTEGER*2



IINT
REAL*4
INTEGER*2



IIFIX
REAL*4
INTEGER*2



IIDINT
REAL*8
INTEGER*2




COMPLEX*8
INTEGER*2




COMPLEX*16
INTEGER*2
INT
Truncation
1

INTEGER*2
INTEGER*4




INTEGER*4
INTEGER*4




INTEGER*8
INTEGER*4



INT
REAL*4
INTEGER*4



JIFIX
REAL*4
INTEGER*4



IDINT
REAL*8
INTEGER*4




COMPLEX*8
INTEGER*4




COMPLEX*16
INTEGER*4
INT8
Truncation
1
INT8
REAL*4
INTEGER*8



KIFIX
REAL*4
INTEGER*8
JINT
Truncation
1

INTEGER*2
INTEGER*4




INTEGER*4
INTEGER*4




INTEGER*8
INTEGER*4



JINT
REAL*4
INTEGER*4



JIDINT
REAL*8
INTEGER*4




COMPLEX*8
INTEGER*4




COMPLEX*16
INTEGER*4
AINT
Truncation
1
AINT
REAL*4
REAL*4



DINT
REAL*8
REAL*8
ININT
Nearest Integer
1
ININT
REAL*4
INTEGER*2

[a + .5 * sign(a)]

IIDNNT
REAL*8
INTEGER*2
JNINT
Nearest Integer
1
JNINT
REAL*4
INTEGER*4

[a + .5 * sign(a)]

JIDNNT
REAL*8
INTEGER*4
KNINT
Nearest Integer
1
KNINT
REAL*4
INTEGER*8

[a + .5 * sign(a)]

KIDNNT
REAL*8
INTEGER*8
NINT
Nearest Integer
1
NINT
REAL*4
INTEGER*4

[a + .5 * sign(a)]

IDNiNT
REAL*8
INTEGER*4
ANINT
Nearest Whole Number
1
ANINT
REAL*4
REAL*4

int(a + .5) if a >= 0 int(a - .5 )if a < 0

DNINT
REAL*8
REAL*8
MAX
Maximum
n > 1
IMAX0
INTEGER*2
INTEGER*2



IMAX1
REAL*4
INTEGER*2



AIMAX0
INTEGER*2
REAL*4



JMAX0
INTEGER*4
INTEGER*4




INTEGER*8
INTEGER*8



JMAX1
REAL*4
INTEGER*4



KMAX1
REAL*4
INTEGER*8



AJMAX0
INTEGER*4
REAL*4



AKMAX0
INTEGER*8
REAL*4



MAX0
INTEGER*4
INTEGER*4



AMAX1
REAL*4
REAL*4



DMAX1
REAL*8
REAL*8
DIM
Positive Difference
2
IIDIM
INTEGER*2
INTEGER*2



JIDIM
INTEGER*4
INTEGER*4



KIDIM
INTEGER*8
INTEGER*8



DIM
REAL*4
REAL*4



DDIM
REAL*8
REAL*8
MIN
Minimum
n > 1
IMIN0
INTEGER*2
INTEGER*2



IMIN1
REAL*4
INTEGER*2



AIMIN0
INTEGER*2
REAL*4



JMIN0
INTEGER*4
INTEGER*4




INTEGER*8
INTEGER*8



JMIN1
REAL*4
INTEGER*4



KMIN1
REAL*4
INTEGER*8



AJMIN0
INTEGER*4
REAL*4



MIN0
INTEGER*4
INTEGER*4



AMIN1
REAL*4
REAL*4



AKNIN0
INTEGER*8
REAL*4



DMIN1
REAL*8
REAL*8
MOD
Remainder
2
IMOD
INTEGER*2
INTEGER*2



JMOD
INTEGER*4
INTEGER*4



KMOD
INTEGER*8
INTEGER*8



AMOD
REAL*4
REAL*4



DMOD
REAL*8
REAL*8
SIGN
Transfer of Sign
2
IISIGN
INTEGER*2
INTEGER*2



JISIGN
INTEGER*4
INTEGER*4



KISIGN
INTEGER*8
INTEGER*8



SIGN
REAL*4
REAL*4



DSIGN
REAL*8
REAL*8
Generic
Name
FUNCTIONS
Number
of Args
Specific
Name
Type of
Argument
Type of
Result
REAL
Convert to
REAL*4
1
FLOATI
INTEGER*2
REAL*4



FLOAT
INTEGER*2
REAL*4



REAL
INTEGER*4
REAL*4



FLOATJ
INTEGER*4
REAL*4



FLOATK
INTEGER*8
REAL*4




REAL*4
REAL*4



SNGL
REAL*8
REAL*4




COMPLEX*8
REAL*4




COMPLEX*16
REAL*4
DBLE
Convert to
REAL*8
1
DFLOTI
INTEGER*2
REAL*8



DFLOAT
INTEGER*4
REAL*8



DFLOTJ
INTEGER*4
REAL*8



DFLOTK
INTEGER*8
REAL*8




REAL*4
REAL*8




REAL*8
REAL*8




COMPLEX*8
REAL*8



DREAL
COMPLEX*16
REAL*8
CMPLX
Convert to COMPLEX*8 or COMPLEX*8 from two arguments
1,2

INTEGER*2

INTEGER*4

INTEGER*8
COMPLEX*8

COMPLEX*8

COMPLEX*8




REAL*4
COMPLEX*8




REAL*8
COMPLEX*8


1

COMPLEX*8
COMPLEX*8




COMPLEX*16
COMPLEX*8
DCMPLX
Convert to COMPLEX*16 or COMPLEX*16 from two arguments
1,2

INTEGER*2

INTEGER*4

INTEGER*8
COMPLEX*8

COMPLEX*8

COMPLEX*8




REAL*4
COMPLEX*16




REAL*8
COMPLEX*16


1

COMPLEX*8
COMPLEX*16




COMPLEX*16
COMPLEX*16
AIMAG
Imag Part of
1
AIMAG
COMPLEX*8
REAL*4

Complex

DIMAG
COMPLEX*16
REAL*8
CONJG
Complex
1
CONJG
COMPLEX*8
COMPLEX*8

Conjugate

DCONJG
COMPLEX*16
COMPLEX*16
Generic
Name
FUNCTIONS
Number
of Args
Specific
Name
Type of
Argument
Type of
Result
IAND
Bitwise AND
2
IIAND
INTEGER*2
INTEGER*2

Perform a logicalAND on bits

JIAND
INTEGER*4
INTEGER*4

Perform a logicalAND on bits

KIAND
INTEGER*8
INTEGER*8
AND



1
typeless
IOR
Bitwise OR
2
IIOR
INTEGER*2
INTEGER*2

Perform a logical OR on bits

JIOR
INTEGER*4
INTEGER*4

Perform a logical OR on bits

KIOR
INTEGER*8
INTEGER*8
OR



1
typeless
IEOR
Bitwise XOR
2
IIEOR
INTEGER*2
INTEGER*2

Bitwise XOR
2

INTEGER*8
INTEGER*8
XOR
logical Exclusive OR

JIEOR
INTEGER*4
INTEGER*4

logical Exclusive OR


INTEGER*8
INTEGER*8
NEQV



1
typeless
EQV
Bitwise Excl. NOR Performs a logical Exclusive Nor
2

1
typeless
NOT
Bitwise Complement
1
INOT
INTEGER*2
INTEGER*2

Complements each bit

JNOT

KNOT
INTEGER*4

INTEGER*8
INTEGER*4

INTEGER*8
COMPL
Bitwise Complement
1

1
typeless
LOC
The address of a data item is returned (Assumes 32-bit address)
1
LOC
INTEGER*2
INTEGER*4
INTEGER*8
REAL*4
INTEGER*4
INTEGER*4
INTEGER*4
INTEGER*4




REAL*8
INTEGER*4




COMPLEX*8
INTEGER*4




COMPLEX*16
INTEGER*4
ISHFT
Bitwise Shift
2
IISHFT
INTEGER*2
INTEGER*2

a1 logically shifted left a2

JISHFT

KISHFT
INTEGER*4

INTEGER*8
INTEGER*4

INTEGER*8
SHIFT
bits. If a2 < 0 then right logical shift.


2
typeless
LSHIFT
Bitwise Left Shift
2

INTEGER*2
INTEGER*2

a1 logically shifted left


INTEGER*4
INTEGER*8

INTEGER*4

INTEGER*8

RSHIFT
Bitwise Right Shift


INTEGER*2
INTEGER*2

a1 logically shifted right


INTEGER*4

INTEGER*8

INTEGER*4

INTEGER*8

ISHFTC
Circular Shift
3
IISHFTC
INTEGER*2
INTEGER*2

Rightmost a3 bits of a1 are shifted circularly by a2 bits; remaining bits in a1 are unaffected.

JISHFTC

KISHFTC
INTEGER*4

INTEGER*8

INTEGER*4

INTEGER*8

CHAR
Character
1

LOGICAL*1
CHARACTER

Returns a character that has he ASCII value specified by the argument.



CHAR
INTEGER*2

INTEGER*4

INTEGER*8

CHARACTER

CHARACTER

CHARACTER






IBITS
Bit Extraction
3
IIBITS
INTEGER*2
INTEGER*2

Extracts bits a2 through (a2 +a 3 - 1) from a1.

JIBITS


KIBITS
INTEGER*4


INTEGER*8
INTEGER*4


INTEGER*8
IBSET
Set Bit
2
IIBSET
INTEGER*2
INTEGER*2

Returns a1 with bit a2 set to 1.

JIBSET

KIBSET
INTEGER*4

INTEGER*8
INTEGER*4

INTEGER*8
BTEST
Bit Test
2
BITEST
INTEGER*2
LOGICAL*2

.TRUE. if bit a2 of of a1 is a 1.

BJTEST

KBTEST
INTEGER*4

INTEGER*8
LOGICAL*4

INTEGER*8
IBCLR
Bit Clear
2
IIBCLR
INTEGER*2
INTEGER*2

Returns a1 with bit a2 set to 0


JIBCLR

KIBCLR
INTEGER*4

INTEGER*8
INTEGER*4

INTEGER*8

1. The arguments to the intrinsics AND , OR , NEQV , EQV , and COMPL may be of any type except for CHARACTER and COMPLEX .

2. The first argument to the SHIFT intrinsic may be of any type except for CHARACTER and COMPLEX. The second argument is any integer type.


<< << " border=0> >> > " border=0> Title Contents Index Home Help

Powered by Plone This site conforms to the following standards: