## Sqrt

### Function Type:

The sqrt function is a mathematical transformational function for REAL and COMPLEX
variables.

### Function Purpose:

Sqrt will return the square root of the argument passed to it. However, the argument can
not be an integer type or negative.

### Required Arguments:

sqrt(**x**)

The argument **x** must be of type REAL or COMPLEX.

### Optional Arguments:

There are no optional arguments to this function.

### Results:

With real arguments, the results of the sqrt function are fairly simple. For the following
lines of code:

x = 267.0
res1 = sqrt(x)
res2 = sqrt (16.0)

the values of res1 and res2 are 16.34013..... and 4.0 respectively.

For additional examples and information see:

lecture seven

examples: fall2.f, and lsq.f

## Up** one level / Home**

**
**

Written by Jason Wehr : jcw142@psu.edu and Maintained by John Mahaffy :
jhm@cac.psu.edu