# sqrt

Square root.

## Syntax

* R = sqrt(M)

## Input argument

* M - a variable

## Output argument

* R - result of sqrt: square root.

## Description

**sqrt** computes the square root.

If input argument is a complex number or negative, **sqrt(z)** computes: sqrt(r) \* (cos(phi/2) + sin(phi/2) \* i) with

r = sqrt((real(z) \* real(z)) + (imag(z) \* imag(z))) and phi = atan2(imag(z), real(z))

## Example

```matlab
x = -3:3;
r = sqrt(x)
```

## See also

[log](log), [abs](abs), [angle](angle).

## History

| Version | Description     |
| ------- | --------------- |
| 1.0.0   | initial version |

## Author

Allan CORNET
