Computes the square root of every element in x.
x (NxK matrix or N-dimensional array) – data
y (NxK matrix or N-dimensional array) – the square roots of each element of x.
let x[2,2] = 1 2 3 4; y = sqrt(x);
The output, in variable y is equal to:
1.00000000 1.41421356 1.73205081 2.00000000
If x is negative, complex results are returned by default. You can turn
the generation of complex numbers for negative inputs on or off in the
GAUSS configuration file,
gauss.cfg and with the
sysstate() function, case 8. If you
turn it off,
sqrt() will generate an error for negative inputs.
If x is already complex, the complex number state does not matter;
will compute a complex result.