You copied the Doc URL to your clipboard.

Arithmetic functions

Functions for manipulating arithmetic.

Arithmetic functions

Intrinsic

Description

Num. of Arguments

Argument Type

Result

ABS

Return absolute value of the supplied argument.

1

INTEGER, REAL,  or COMPLEX

INTEGER, REAL,  or COMPLEX

ACOS

Return the arccosine (in radians) of the specified value.

1

REAL

REAL

ACOSD

Return the arccosine (in degrees) of the specified value.

1

REAL

REAL

AIMAG

Return the value of the imaginary part of a complex number.

1

COMPLEX

REAL

AINT

Truncate the supplied value to a whole number.

2

REAL, INTEGER

REAL

AND

Perform a logical AND on corresponding bits of the arguments.

2

Any, except CHAR or COMPLEX

INTEGER or LOGICAL

ANINT

Return the nearest whole number to the supplied argument.

2

REAL, INTEGER

REAL

ASIN

Return the arcsine (in radians) of the specified value.

1

REAL

REAL

ASIND

Return the arcsine (in degrees) of the specified value.

1

REAL

REAL

ATAN

Return the arctangent (in radians) of the specified value.

1

REAL

REAL

ATAN2

Return the arctangent (in radians) of the specified pair of values.

2

REAL, REAL

REAL

ATAN2D

Return the arctangent (in degrees) of the specified pair of values.

1

REAL, REAL

REAL

ATAND

Return the arctangent (in degrees) of the specified value.

1

REAL

REAL

CEILING

Return the least integer greater than or equal to the supplied real argument.

2

REAL, KIND

INTEGER

CMPLX

Convert the supplied argument or arguments to complex type.

2





3
{INTEGER, REAL,
or COMPLEX,},
{INTEGER, REAL,
or COMPLEX}


{INTEGER, REAL, or COMPLEX}, {INTEGER or REAL}, KIND
COMPLEX





COMPLEX

COMPL

Perform a logical complement on the argument.

1

Any, except CHAR or COMPLEX

N/A

COS

Return the cosine (in radians) of the specified value.

1

REAL COMPLEX

REAL

COSD

Return the cosine (in degrees) of the specified value.

1

REAL COMPLEX

REAL

COSH

Return the hyperbolic cosine of the specified value.

1

REAL

REAL

DBLE

Convert to double precision real.

1

INTEGER, REAL,  or COMPLEX

REAL

DCMPLX

Convert the argument or supplied arguments to double complex type.

1


2
INTEGER, REAL,
or COMPLEX

INTEGER, REAL
DOUBLE COMPLEX


DOUBLE COMPLEX

DPROD

Double precision real product.

2

REAL, REAL

REAL (double precision)

EQV

Perform a logical exclusive NOR on the arguments.

2

Any, except CHAR or COMPLEX

INTEGER or LOGICAL

EXP

Exponential function.

1

REAL COMPLEX

REAL COMPLEX

EXPONENT

Return the exponent part of a real number.

1

REAL

INTEGER

FLOOR

Return the greatest integer less than or equal to the supplied real argument.

1
2
REAL
REAL, KIND
REAL
KIND

FRACTION

Return the fractional part of a real number.

1

REAL

INTEGER

IINT

Convert a value to a short integer type.

1

INTEGER, REAL,  or COMPLEX

INTEGER

ININT

Return the nearest short integer to the real argument.

1

REAL

INTEGER

INT

Convert a value to integer type.

1


2
INTEGER, REAL,
or COMPLEX

{INTEGER, REAL, or COMPLEX}, KIND
INTEGER


INTEGER

INT8

Convert a real value to a long integer type.

1

REAL

INTEGER

IZEXT

Zero-extend the argument.

1

LOGICAL or INTEGER

INTEGER

JINT

Convert a value to an integer type.

1

INTEGER, REAL,  or COMPLEX

INTEGER

JNINT

Return the nearest integer to the real argument.

1

REAL

INTEGER

KNINT

Return the nearest integer to the real argument.

1

REAL

INTEGER (long)

LOG

Return the natural logarithm.

1

REAL or COMPLEX

REAL

LOG10

Return the common logarithm.

1

REAL

REAL

MAX

Return the maximum value of the supplied arguments.

2 or more

INTEGER or REAL (all of same kind)

Same as argument type

MIN

Return the minimum value of the supplied arguments.

2 or more

INTEGER or REAL (all of same kind)

Same as argument type

MOD

Find the remainder.

2 or more

{INTEGER or REAL}, {INTEGER or REAL} (all of same kind)

Same as argument type

MODULO

Return the modulo value of the arguments.

2 or more

{INTEGER or REAL}, {INTEGER or REAL} (all of same kind)

Same as argument type

NEAREST

Return the nearest different number that can be represented, by a machine, in a given direction.

2

REAL, REAL (non-zero)

REAL

NEQV

Perform a logical exclusive OR on the arguments.

2

Any, except CHAR or COMPLEX

INTEGER or LOGICAL

NINT

Convert a value to integer type.

1
2
REAL
REAL, KIND
INTEGER

REAL

Convert the argument to real.

1


2
INTEGER, REAL,
or COMPLEX

{INTEGER, REAL, or COMPLEX}, KIND
REAL


REAL

RRSPACING

Return the reciprocal of the relative spacing of model numbers near the argument value.

1

REAL

REAL

SET_ EXPONENT

Return the model number whose fractional part is the fractional part of the model representation of the first argument and whose exponent part is the second argument.

2

REAL, INTEGER

REAL

SIGN

Return the absolute value of A times the sign of B. Syntax: SIGN(A, B)

2

{INTEGER or REAL},

{INTEGER or REAL}

Same as argument

SIN

Return the sine (in radians) of the specified value.

1
REAL
COMPLEX
REAL

SIND

Return the sine (in degrees) of the specified value.

1
REAL
COMPLEX
REAL

SINH

Return the hyperbolic sine of the specified value.

1

REAL

REAL

SPACING

Return the relative spacing of model numbers near the argument value.

1

REAL

REAL

SQRT

Return the square root of the argument.

1
REAL
COMPLEX
REAL
COMPLEX

TAN

Return the tangent (in radians) of the specified value.

1

REAL

REAL

TAND

Return the tangent (in degrees) of the specified value.

1

REAL

REAL

TANH

Return the hyperbolic tangent of the specified value.

1

REAL

REAL

Was this page helpful? Yes No