XL Fortran for AIX 8.1

Language Reference


Square root.

must be of type real or complex. Unless X is complex, its value must be greater than or equal to zero.


Elemental function

Result Type and Attributes

Same as X.

Result Value


SQRT (4.0) has the value 2.0.

Specific Name Argument Type Result Type Pass As Arg?
SQRT default real default real yes
DSQRT double precision real double precision real yes
QSQRT REAL(16) REAL(16) yes (1)
CSQRT (2) default complex default complex yes
CDSQRT (2) double complex double complex yes (1)
ZSQRT (2) COMPLEX(8) COMPLEX(8) yes (1)
CQSQRT (2) COMPLEX(16) COMPLEX(16) yes (1)


  1. IBM Extension: the ability to pass the name as an argument.

  2. Given that X is a complex number in the form a + bi, where i = (-1)½, abs(X) + abs(a) must be less than or equal to 1.797693 * 10308.

[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]