FORTRAN Reference Manual

Intrinsic Functions
FORTRAN Reference Manual528615-001
8-29
SQRT Function
Considerations
The result type of the SINH function is the same as the type of its argument.
The value of SINH (x) is defined as
(EXP (x) - EXP (-x))/2.0
Note that
SINH (-x) = -SINH (x)
Example of the SINH Function
y = SINH (x)
SQRT Function
The SQRT function returns the square root of a number.
The table below shows the argument and function type for the SQRT generic function
and its associated specific functions.
Considerations
The result type of the SQRT function is the same as the type of its argument.
For a real or double precision argument x < 0, program execution terminates
abnormally with an error message.
For a complex argument z = CMPLX (x, y), the value of SQRT (z) is defined as
CMPLX ( , SIGN ( , )
If ABS (z) < x, program execution terminates abnormally with an error message.
Example of the SQRT Function
COMPLEX y, z
z = CSQRT (y)
a = SQRT (b)
Syntax Argument Type Function Type
SQRT (x)
SQRT (x) Real Real
DSQRT (x) Double Precision Double Precision
CSQRT (x) Complex Complex
x is an arithmetic expression.
ZX+()2.0 ZX()2.0 Y°)°