naginterfaces.library.complex.divide

naginterfaces.library.complex.divide(xr, xi, yr, yi)[source]

divide divides one complex number, , by a second complex number, , returning the result in .

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

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

Parameters
xrfloat

, the real part of .

xifloat

, the imaginary part of .

yrfloat

, the real part of .

yifloat

, the imaginary part of .

Returns
zrfloat

, the real part of .

zifloat

, 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 result is calculated using Smith’s algorithm with scaling, from Li et al. (2002), which ensures that no unnecessary overflow or underflow occurs at intermediate stages of the computation.

References

Li, X S, Demmel, J W, Bailey, D H, Henry, G, Hida, Y, Iskandar, J, Kahan, W, Kapur, A, Martin, M C, Tung, T and Yoo, D J, 2002, Design, implementation and testing of extended and mixed precision BLAS, ACM Trans. Math. Soft. (28(2)), 152–205