 LAPACK  3.10.0 LAPACK: Linear Algebra PACKage

## ◆ scombssq()

 subroutine scombssq ( real, dimension( 2 ) V1, real, dimension( 2 ) V2 )

SCOMBSSQ adds two scaled sum of squares quantities

Purpose:
``` SCOMBSSQ adds two scaled sum of squares quantities, V1 := V1 + V2.
That is,

V1_scale**2 * V1_sumsq := V1_scale**2 * V1_sumsq
+ V2_scale**2 * V2_sumsq```
Parameters
 [in,out] V1 ``` V1 is REAL array, dimension (2). The first scaled sum. V1(1) = V1_scale, V1(2) = V1_sumsq.``` [in] V2 ``` V2 is REAL array, dimension (2). The second scaled sum. V2(1) = V2_scale, V2(2) = V2_sumsq.```

Definition at line 59 of file scombssq.f.

60 *
61 * -- LAPACK auxiliary routine --
62 * -- LAPACK is a software package provided by Univ. of Tennessee, --
63 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
64 * November 2018
65 *
66 * .. Array Arguments ..
67  REAL V1( 2 ), V2( 2 )
68 * ..
69 *
70 * =====================================================================
71 *
72 * .. Parameters ..
73  REAL ZERO
74  parameter( zero = 0.0d+0 )
75 * ..
76 * .. Executable Statements ..
77 *
78 * A zero sum V2 shall not modify the scaling factor of V1
79  IF( v2( 2 ).EQ.zero ) RETURN
80 *
81  IF( v1( 1 ).GE.v2( 1 ) ) THEN
82  IF( v1( 1 ).NE.zero ) THEN
83  v1( 2 ) = v1( 2 ) + ( v2( 1 ) / v1( 1 ) )**2 * v2( 2 )
84  ELSE
85  v1( 2 ) = v1( 2 ) + v2( 2 )
86  END IF
87  ELSE
88  v1( 2 ) = v2( 2 ) + ( v1( 1 ) / v2( 1 ) )**2 * v1( 2 )
89  v1( 1 ) = v2( 1 )
90  END IF
91  RETURN
92 *
93 * End of SCOMBSSQ
94 *
Here is the caller graph for this function: