sqrt(x)
computes the square root of x
.
FORTRAN 77 and later
Elemental function
result = sqrt(x)
x
- The type shall be real
or complex
.The return value is of type real
or complex
. The kind type parameter is the same as x
.
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