naginterfaces.library.complex.sqrt

naginterfaces.library.complex.sqrt(xr, xi)[source]

sqrt evaluates the square root of the complex number .

For full information please refer to the NAG Library document for a02aa

https://www.nag.com/numeric/nl/nagdoc_28.4/flhtml/a02/a02aaf.html

Parameters
xrfloat

, the real part of .

xifloat

, the imaginary part of .

Returns
yrfloat

, the real part of .

yifloat

, the imaginary part of .

Notes

In the NAG Library the traditional C interface for this routine uses a different algorithmic base. Please contact NAG if you have any questions about compatibility.

The method of evaluating depends on the value of .

For ,

For ,

Overflow is avoided when squaring and by calling abs() to evaluate .

References

Wilkinson, J H and Reinsch, C, 1971, Handbook for Automatic Computation II, Linear Algebra, Springer–Verlag