9.247 SQRT — Square-root function
- Description:
-
SQRT(X)computes the square root of X. - Standard:
-
Fortran 77 and later
- Class:
-
Elemental function
- Syntax:
-
RESULT = SQRT(X) - Arguments:
-
X The type shall be REALorCOMPLEX. - Return value:
-
The return value is of type
REALorCOMPLEX. The kind type parameter is the same as X. - Example:
-
program test_sqrt real(8) :: x = 2.0_8 complex :: z = (1.0, 2.0) x = sqrt(x) z = sqrt(z) end program test_sqrt
- Specific names:
-
Name Argument Return type Standard SQRT(X)REAL(4) XREAL(4)Fortran 95 and later DSQRT(X)REAL(8) XREAL(8)Fortran 95 and later CSQRT(X)COMPLEX(4) XCOMPLEX(4)Fortran 95 and later ZSQRT(X)COMPLEX(8) XCOMPLEX(8)GNU extension CDSQRT(X)COMPLEX(8) XCOMPLEX(8)GNU extension
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-6.4.0/gfortran/SQRT.html