NAG FL Interface
f06kjf (dzssq)

Settings help

FL Name Style:


FL Specification Language:


1 Purpose

f06kjf updates the Euclidean norm of complex vector in scaled form.

2 Specification

Fortran Interface
Subroutine f06kjf ( n, x, incx, scal, sumsq)
Integer, Intent (In) :: n, incx
Real (Kind=nag_wp), Intent (Inout) :: scal, sumsq
Complex (Kind=nag_wp), Intent (In) :: x(*)
C Header Interface
#include <nag.h>
void  f06kjf_ (const Integer *n, const Complex x[], const Integer *incx, double *scal, double *sumsq)
The routine may be called by the names f06kjf or nagf_blas_dzssq.

3 Description

Given an n-element complex vector x, and real scalars α and ξ, f06kjf returns updated values α~ and ξ~ such that
α~2ξ~=|x1|2+|x2|2++|xn|2+α2ξ.  
f06kjf is designed for use in the safe computation of the Euclidean norm of a complex vector, without unnecessary overflow or destructive underflow. An initial call to f06kjf (with ξ=1 and α=0) may be followed by further calls to f06kjf and finally a call to f06bmf to complete the computation. Multiple calls of f06kjf may be needed if the elements of the vector cannot all be accessed in a single array x.

4 References

None.

5 Arguments

1: n Integer Input
On entry: n, the number of elements in x.
2: x(*) Complex (Kind=nag_wp) array Input
Note: the dimension of the array x must be at least max(1, 1+(n-1) ×incx ) .
On entry: the n-element vector x. xi must be stored in x(1+(i-1)×incx), for i=1,2,,n.
Intermediate elements of x are not referenced.
3: incx Integer Input
On entry: the increment in the subscripts of x between successive elements of x.
Constraint: incx>0.
4: scal Real (Kind=nag_wp) Input/Output
On entry: the scaling factor α. On the first call to f06kjf scal=0.0.
Constraint: scal0.
On exit: the updated scaling factor α~=maxi (α,|Re(xi)|,|Im(xi)|) .
5: sumsq Real (Kind=nag_wp) Input/Output
On entry: the scaled sum of squares ξ. On the first call to f06kjf sumsq=1.0.
Constraint: sumsq1.
On exit: the updated scaled sum of squares ξ~, satisfying: 1ξ~ξ+2n.

6 Error Indicators and Warnings

None.

7 Accuracy

Not applicable.

8 Parallelism and Performance

f06kjf is not threaded in any implementation.

9 Further Comments

None.

10 Example

None.