NAG Library Routine Document
a02acf
(divide)
1
Purpose
a02acf divides one complex number, , by a second complex number, , returning the result in .
2
Specification
Fortran Interface
Real (Kind=nag_wp), Intent (In) | :: |
xr,
xi,
yr,
yi | Real (Kind=nag_wp), Intent (Out) | :: |
zr,
zi |
|
C Header Interface
#include nagmk26.h
void |
a02acf_ (
const double *xr,
const double *xi,
const double *yr,
const double *yi,
double *zr,
double *zi) |
|
3
Description
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.
4
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
5
Arguments
- 1: – Real (Kind=nag_wp)Input
- 2: – Real (Kind=nag_wp)Input
-
On entry: and , the real and imaginary parts of , respectively.
- 3: – Real (Kind=nag_wp)Input
- 4: – Real (Kind=nag_wp)Input
-
On entry: and , the real and imaginary parts of , respectively.
- 5: – Real (Kind=nag_wp)Output
- 6: – Real (Kind=nag_wp)Output
-
On exit: and , the real and imaginary parts of , respectively.
6
Error Indicators and Warnings
None.
7
Accuracy
The result should be correct to machine precision.
8
Parallelism and Performance
a02acf is not threaded in any implementation.
The time taken by a02acf is negligible.
This routine must not be called with and .
10
Example
This example finds the value of .
10.1
Program Text
Program Text (a02acfe.f90)
10.2
Program Data
Program Data (a02acfe.d)
10.3
Program Results
Program Results (a02acfe.r)