diff --git a/books/bookvol10.5.pamphlet b/books/bookvol10.5.pamphlet
index 8c637a3..6fe24a4 100644
--- a/books/bookvol10.5.pamphlet
+++ b/books/bookvol10.5.pamphlet
@@ -348,7 +348,7 @@ For complex symmetric matrices, TRANSx=H is not allowed.
)set message auto off
)clear all
---S 1 of 121
+--S 1 of 127
t1:Complex DoubleFloat := complex(1.0,0)
--R
--R
@@ -356,7 +356,7 @@ t1:Complex DoubleFloat := complex(1.0,0)
--R Type: Complex(DoubleFloat)
--E 1
---S 2 of 121
+--S 2 of 127
dcabs1(t1)
--R
--R
@@ -364,7 +364,7 @@ dcabs1(t1)
--R Type: DoubleFloat
--E 2
---S 3 of 121
+--S 3 of 127
t2:Complex DoubleFloat := complex(1.0,1.0)
--R
--R
@@ -372,7 +372,7 @@ t2:Complex DoubleFloat := complex(1.0,1.0)
--R Type: Complex(DoubleFloat)
--E 3
---S 4 of 121
+--S 4 of 127
dcabs1(t2)
--R
--R
@@ -380,7 +380,7 @@ dcabs1(t2)
--R Type: DoubleFloat
--E 4
---S 5 of 121
+--S 5 of 127
t3:Complex DoubleFloat := complex(1.0,-1.0)
--R
--R
@@ -388,7 +388,7 @@ t3:Complex DoubleFloat := complex(1.0,-1.0)
--R Type: Complex(DoubleFloat)
--E 5
---S 6 of 121
+--S 6 of 127
dcabs1(t3)
--R
--R
@@ -396,7 +396,7 @@ dcabs1(t3)
--R Type: DoubleFloat
--E 6
---S 7 of 121
+--S 7 of 127
t4:Complex DoubleFloat := complex(-1.0,-1.0)
--R
--R
@@ -404,7 +404,7 @@ t4:Complex DoubleFloat := complex(-1.0,-1.0)
--R Type: Complex(DoubleFloat)
--E 7
---S 8 of 121
+--S 8 of 127
dcabs1(t4)
--R
--R
@@ -412,7 +412,7 @@ dcabs1(t4)
--R Type: DoubleFloat
--E 8
---S 9 of 121
+--S 9 of 127
t5:Complex DoubleFloat := complex(-2.0,-2.0)
--R
--R
@@ -420,7 +420,7 @@ t5:Complex DoubleFloat := complex(-2.0,-2.0)
--R Type: Complex(DoubleFloat)
--E 9
---S 10 of 121
+--S 10 of 127
dcabs1(t5)
--R
--R
@@ -430,196 +430,196 @@ dcabs1(t5)
)clear all
---S 11 of 121
+--S 11 of 127
a:PRIMARR(DFLOAT):=[ [1.0,2.0,3.0,4,0,5,0,6,0] ]
--R
--R (1) [1.,2.,3.,4.,0.,5.,0.,6.,0.]
--R Type: PrimitiveArray(DoubleFloat)
--E 11
---S 12 of 121
+--S 12 of 127
dasum(3,a,-1) -- 0.0 neg incx
--R
--R (2) 0.
--R Type: DoubleFloat
--E 12
---S 13 of 121
+--S 13 of 127
dasum(3,a,0) -- 0.0 zero incx
--R
--R (3) 0.
--R Type: DoubleFloat
--E 13
---S 14 of 121
+--S 14 of 127
dasum(-1,a,1) -- 0.0 neg elements
--R
--R (4) 0.
--R Type: DoubleFloat
--E 14
---S 15 of 121
+--S 15 of 127
dasum(0,a,1) -- 0.0 no elements
--R
--R (5) 0.
--R Type: DoubleFloat
--E 15
---S 16 of 121
+--S 16 of 127
dasum(1,a,1) -- 1.0 1.0
--R
--R (6) 1.
--R Type: DoubleFloat
--E 16
---S 17 of 121
+--S 17 of 127
dasum(2,a,1) -- 3.0 1.0+2.0
--R
--R (7) 3.
--R Type: DoubleFloat
--E 17
---S 18 of 121
+--S 18 of 127
dasum(3,a,1) -- 6.0 1.0+2.0+3.0
--R
--R (8) 6.
--R Type: DoubleFloat
--E 18
---S 19 of 121
+--S 19 of 127
dasum(4,a,1) -- 10.0 1.0+2.0+3.0+4.0
--R
--R (9) 10.
--R Type: DoubleFloat
--E 19
---S 20 of 121
+--S 20 of 127
dasum(5,a,1) -- 15.0 1.0+2.0+3.0+4.0+5.0
--R
--R (10) 10.
--R Type: DoubleFloat
--E 20
---S 21 of 121
+--S 21 of 127
dasum(6,a,1) -- 21.0 1.0+2.0+3.0+4.0+5.0+6.0
--R
--R (11) 15.
--R Type: DoubleFloat
--E 21
---S 22 of 121
+--S 22 of 127
dasum(7,a,1) -- 21.0 1.0+2.0+3.0+4.0+5.0+6.0
--R
--R (12) 15.
--R Type: DoubleFloat
--E 22
---S 23 of 121
+--S 23 of 127
dasum(1,a,2) -- 1.0 1.0
--R
--R (13) 1.
--R Type: DoubleFloat
--E 23
---S 24 of 121
+--S 24 of 127
dasum(2,a,2) -- 4.0 1.0+3.0
--R
--R (14) 4.
--R Type: DoubleFloat
--E 24
---S 25 of 121
+--S 25 of 127
dasum(3,a,2) -- 9.0 1.0+3.0+5.0
--R
--R (15) 4.
--R Type: DoubleFloat
--E 25
---S 26 of 121
+--S 26 of 127
dasum(4,a,2) -- 9.0 1.0+3.0+5.0
--R
--R (16) 4.
--R Type: DoubleFloat
--E 26
---S 27 of 121
+--S 27 of 127
dasum(1,a,3) -- 1.0 1.0
--R
--R (17) 1.
--R Type: DoubleFloat
--E 27
---S 28 of 121
+--S 28 of 127
dasum(2,a,3) -- 5.0 1.0+4.0
--R
--R (18) 5.
--R Type: DoubleFloat
--E 28
---S 29 of 121
+--S 29 of 127
dasum(3,a,3) -- 5.0 1.0+4.0
--R
--R (19) 5.
--R Type: DoubleFloat
--E 29
---S 30 of 121
+--S 30 of 127
dasum(1,a,4) -- 1.0 1.0
--R
--R (20) 1.
--R Type: DoubleFloat
--E 30
---S 31 of 121
+--S 31 of 127
dasum(2,a,4) -- 6.0 1.0+5.0
--R
--R (21) 1.
--R Type: DoubleFloat
--E 31
---S 32 of 121
+--S 32 of 127
dasum(3,a,4) -- 6.0 1.0+5.0
--R
--R (22) 1.
--R Type: DoubleFloat
--E 32
---S 33 of 121
+--S 33 of 127
dasum(1,a,5) -- 1.0 1.0
--R
--R (23) 1.
--R Type: DoubleFloat
--E 33
---S 34 of 121
+--S 34 of 127
dasum(2,a,5) -- 7.0 1.0+6.0
--R
--R (24) 6.
--R Type: DoubleFloat
--E 34
---S 35 of 121
+--S 35 of 127
dasum(3,a,5) -- 7.0 1.0+6.0
--R
--R (25) 6.
--R Type: DoubleFloat
--E 35
---S 36 of 121
+--S 36 of 127
dasum(1,a,6) -- 1.0 1.0
--R
--R (26) 1.
--R Type: DoubleFloat
--E 36
---S 37 of 121
+--S 37 of 127
dasum(2,a,6) -- 1.0 1.0
--R
--R (27) 1.
--R Type: DoubleFloat
--E 37
---S 38 of 121
+--S 38 of 127
dasum(1,a,7) -- 1.0 1.0
--R
--R (28) 1.
@@ -628,7 +628,7 @@ dasum(1,a,7) -- 1.0 1.0
)clear all
---S 39 of 121
+--S 39 of 127
a:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R
--R
@@ -636,7 +636,7 @@ a:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 39
---S 40 of 121
+--S 40 of 127
b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R
--R
@@ -644,7 +644,7 @@ b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 40
---S 41 of 121
+--S 41 of 127
daxpy(3,2.0,a,1,b,1)
--R
--R
@@ -652,7 +652,7 @@ daxpy(3,2.0,a,1,b,1)
--R Type: PrimitiveArray(DoubleFloat)
--E 41
---S 42 of 121
+--S 42 of 127
b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R
--R
@@ -660,7 +660,7 @@ b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 42
---S 43 of 121
+--S 43 of 127
daxpy(7,2.0,a,1,b,1)
--R
--R
@@ -668,7 +668,7 @@ daxpy(7,2.0,a,1,b,1)
--R Type: PrimitiveArray(DoubleFloat)
--E 43
---S 44 of 121
+--S 44 of 127
b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R
--R
@@ -681,7 +681,7 @@ Note that Axiom properly handles array indexes that are out of bounds.
The BLAS daxpy routine cannot check this condition.
\begin{chunk}{BlasLevelOne.input}
---S 45 of 121
+--S 45 of 127
daxpy(8,2.0,a,1,b,1)
--R
--R
@@ -689,7 +689,7 @@ daxpy(8,2.0,a,1,b,1)
--R Type: PrimitiveArray(DoubleFloat)
--E 45
---S 46 of 121
+--S 46 of 127
b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R
--R
@@ -697,7 +697,7 @@ b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 46
---S 47 of 121
+--S 47 of 127
daxpy(3,2.0,a,3,b,3)
--R
--R
@@ -705,7 +705,7 @@ daxpy(3,2.0,a,3,b,3)
--R Type: PrimitiveArray(DoubleFloat)
--E 47
---S 48 of 121
+--S 48 of 127
b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R
--R
@@ -713,7 +713,7 @@ b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 48
---S 49 of 121
+--S 49 of 127
daxpy(4,2.0,a,2,b,2)
--R
--R
@@ -721,7 +721,7 @@ daxpy(4,2.0,a,2,b,2)
--R Type: PrimitiveArray(DoubleFloat)
--E 49
---S 50 of 121
+--S 50 of 127
b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R
--R
@@ -729,7 +729,7 @@ b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 50
---S 51 of 121
+--S 51 of 127
daxpy(5,2.0,a,2,b,2)
--R
--R
@@ -737,7 +737,7 @@ daxpy(5,2.0,a,2,b,2)
--R Type: PrimitiveArray(DoubleFloat)
--E 51
---S 52 of 121
+--S 52 of 127
b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R
--R
@@ -745,7 +745,7 @@ b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 52
---S 53 of 121
+--S 53 of 127
daxpy(3,2.0,a,2,b,2)
--R
--R
@@ -753,7 +753,7 @@ daxpy(3,2.0,a,2,b,2)
--R Type: PrimitiveArray(DoubleFloat)
--E 53
---S 54 of 121
+--S 54 of 127
b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R
--R
@@ -761,7 +761,7 @@ b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 54
---S 55 of 121
+--S 55 of 127
daxpy(3,-2.0,a,2,b,2)
--R
--R
@@ -769,7 +769,7 @@ daxpy(3,-2.0,a,2,b,2)
--R Type: PrimitiveArray(DoubleFloat)
--E 55
---S 56 of 121
+--S 56 of 127
a:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0] ]
--R
--R
@@ -777,7 +777,7 @@ a:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 56
---S 57 of 121
+--S 57 of 127
b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0] ]
--R
--R
@@ -785,7 +785,7 @@ b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 57
---S 58 of 121
+--S 58 of 127
daxpy(3,-2.0,a,1,b,2)
--R
--R
@@ -793,7 +793,7 @@ daxpy(3,-2.0,a,1,b,2)
--R Type: PrimitiveArray(DoubleFloat)
--E 58
---S 59 of 121
+--S 59 of 127
b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R
--R
@@ -801,7 +801,7 @@ b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 59
---S 60 of 121
+--S 60 of 127
daxpy(3,0.0,a,1,b,2)
--R
--R
@@ -811,7 +811,7 @@ daxpy(3,0.0,a,1,b,2)
)clear all
---S 61 of 121
+--S 61 of 127
a:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R
--R
@@ -819,7 +819,7 @@ a:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 61
---S 62 of 121
+--S 62 of 127
b:PRIMARR(DFLOAT):=[ [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ]
--R
--R
@@ -827,7 +827,7 @@ b:PRIMARR(DFLOAT):=[ [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 62
---S 63 of 121
+--S 63 of 127
dcopy(3,a,1,b,1)
--R
--R
@@ -835,7 +835,7 @@ dcopy(3,a,1,b,1)
--R Type: PrimitiveArray(DoubleFloat)
--E 63
---S 64 of 121
+--S 64 of 127
b:PRIMARR(DFLOAT):=[ [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ]
--R
--R
@@ -843,7 +843,7 @@ b:PRIMARR(DFLOAT):=[ [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 64
---S 65 of 121
+--S 65 of 127
dcopy(7,a,1,b,1)
--R
--R
@@ -851,7 +851,7 @@ dcopy(7,a,1,b,1)
--R Type: PrimitiveArray(DoubleFloat)
--E 65
---S 66 of 121
+--S 66 of 127
b:PRIMARR(DFLOAT):=[ [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ]
--R
--R
@@ -859,7 +859,7 @@ b:PRIMARR(DFLOAT):=[ [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 66
---S 67 of 121
+--S 67 of 127
dcopy(8,a,1,b,1)
--R
--R
@@ -867,7 +867,7 @@ dcopy(8,a,1,b,1)
--R Type: PrimitiveArray(DoubleFloat)
--E 67
---S 68 of 121
+--S 68 of 127
b:PRIMARR(DFLOAT):=[ [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ]
--R
--R
@@ -875,7 +875,7 @@ b:PRIMARR(DFLOAT):=[ [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 68
---S 69 of 121
+--S 69 of 127
dcopy(3,a,3,b,3)
--R
--R
@@ -883,7 +883,7 @@ dcopy(3,a,3,b,3)
--R Type: PrimitiveArray(DoubleFloat)
--E 69
---S 70 of 121
+--S 70 of 127
b:PRIMARR(DFLOAT):=[ [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ]
--R
--R
@@ -891,7 +891,7 @@ b:PRIMARR(DFLOAT):=[ [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 70
---S 71 of 121
+--S 71 of 127
dcopy(4,a,2,b,2)
--R
--R
@@ -899,7 +899,7 @@ dcopy(4,a,2,b,2)
--R Type: PrimitiveArray(DoubleFloat)
--E 71
---S 72 of 121
+--S 72 of 127
b:PRIMARR(DFLOAT):=[ [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ]
--R
--R
@@ -907,7 +907,7 @@ b:PRIMARR(DFLOAT):=[ [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 72
---S 73 of 121
+--S 73 of 127
dcopy(5,a,2,b,2)
--R
--R
@@ -915,7 +915,7 @@ dcopy(5,a,2,b,2)
--R Type: PrimitiveArray(DoubleFloat)
--E 73
---S 74 of 121
+--S 74 of 127
b:PRIMARR(DFLOAT):=[ [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ]
--R
--R
@@ -923,7 +923,7 @@ b:PRIMARR(DFLOAT):=[ [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 74
---S 75 of 121
+--S 75 of 127
dcopy(3,a,2,b,2)
--R
--R
@@ -931,7 +931,7 @@ dcopy(3,a,2,b,2)
--R Type: PrimitiveArray(DoubleFloat)
--E 75
---S 76 of 121
+--S 76 of 127
a:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0] ]
--R
--R
@@ -939,7 +939,7 @@ a:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 76
---S 77 of 121
+--S 77 of 127
b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0] ]
--R
--R
@@ -947,7 +947,7 @@ b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 77
---S 78 of 121
+--S 78 of 127
dcopy(3,a,1,b,1)
--R
--R
@@ -955,7 +955,7 @@ dcopy(3,a,1,b,1)
--R Type: PrimitiveArray(DoubleFloat)
--E 78
---S 79 of 121
+--S 79 of 127
b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0] ]
--R
--R
@@ -963,7 +963,7 @@ b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 79
---S 80 of 121
+--S 80 of 127
dcopy(3,a,1,b,2)
--R
--R
@@ -971,7 +971,7 @@ dcopy(3,a,1,b,2)
--R Type: PrimitiveArray(DoubleFloat)
--E 80
---S 81 of 121
+--S 81 of 127
a:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0] ]
--R
--R
@@ -979,7 +979,7 @@ a:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 81
---S 82 of 121
+--S 82 of 127
b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0] ]
--R
--R
@@ -987,7 +987,7 @@ b:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0] ]
--R Type: PrimitiveArray(DoubleFloat)
--E 82
---S 83 of 121
+--S 83 of 127
dcopy(5,a,1,b,1)
--R
--R
@@ -997,63 +997,63 @@ dcopy(5,a,1,b,1)
)clear all
---S 84 of 121
+--S 84 of 127
a:PRIMARR(DFLOAT):=[ [ 1.0, 2.0, 3.0, 4.0, 5.0] ]
--R
--R (1) [1.,2.,3.,4.,5.]
--R Type: PrimitiveArray(DoubleFloat)
--E 84
---S 85 of 121
+--S 85 of 127
b:PRIMARR(DFLOAT):=[ [ 5.0, 6.0, 7.0, 8.0, 9.0] ]
--R
--R (2) [5.,6.,7.,8.,9.]
--R Type: PrimitiveArray(DoubleFloat)
--E 85
---S 86 of 121
+--S 86 of 127
ddot(0,a,1,b,1)
--R
--R (3) 0.
--R Type: DoubleFloat
--E 86
---S 87 of 121
+--S 87 of 127
ddot(3,a,1,b,1)
--R
--R (4) 38.
--R Type: DoubleFloat
--E 87
---S 88 of 121
+--S 88 of 127
ddot(3,a,1,b,2)
--R
--R (5) 46.
--R Type: DoubleFloat
--E 88
---S 89 of 121
+--S 89 of 127
ddot(3,a,2,b,1)
--R
--R (6) 58.
--R Type: DoubleFloat
--E 89
---S 90 of 121
+--S 90 of 127
ddot(3,a,1,b,-2)
--R
--R (7) 38.
--R Type: DoubleFloat
--E 90
---S 91 of 121
+--S 91 of 127
ddot(3,a,-2,b,1)
--R
--R (8) 50.
--R Type: DoubleFloat
--E 91
---S 92 of 121
+--S 92 of 127
ddot(3,a,-2,b,-2)
--R
--R (9) 71.
@@ -1062,28 +1062,28 @@ ddot(3,a,-2,b,-2)
)clear all
---S 93 of 121
+--S 93 of 127
a:PRIMARR(DFLOAT):=[ [ 3.0, -4.0, 5.0, -7.0, 9.0] ]
--R
--R (1) [3.,- 4.,5.,- 7.,9.]
--R Type: PrimitiveArray(DoubleFloat)
--E 93
---S 94 of 121
+--S 94 of 127
dnrm2(3,a,1)
--R
--R (2) 7.0710678118654755
--R Type: DoubleFloat
--E 94
---S 95 of 121
+--S 95 of 127
dnrm2(5,a,1)
--R
--R (3) 13.416407864998739
--R Type: DoubleFloat
--E 95
---S 96 of 121
+--S 96 of 127
dnrm2(3,a,2)
--R
--R (4) 10.723805294763608
@@ -1091,7 +1091,7 @@ dnrm2(3,a,2)
--E 96
)clear all
---S 97 of 121
+--S 97 of 127
a:MATRIX(DFLOAT):=[[6,5,0],[5,1,4],[0,4,3]]
--R
--R +6. 5. 0.+
@@ -1102,7 +1102,7 @@ a:MATRIX(DFLOAT):=[[6,5,0],[5,1,4],[0,4,3]]
--R Type: Matrix(DoubleFloat)
--E 97
---S 98 of 121
+--S 98 of 127
t1:=drotg(elt(a,1,1),elt(a,1,2),0.0,0.0)
--R
--R (2)
@@ -1111,7 +1111,7 @@ t1:=drotg(elt(a,1,1),elt(a,1,2),0.0,0.0)
--R Type: PrimitiveArray(DoubleFloat)
--E 98
---S 99 of 121
+--S 99 of 127
g1:MATRIX(DFLOAT):=[[elt(t1,2), elt(t1,3),0.0],_
[-elt(t1,3),elt(t1,2),0.0],_
[0.0, 0.0, 1.0]]
@@ -1125,7 +1125,7 @@ g1:MATRIX(DFLOAT):=[[elt(t1,2), elt(t1,3),0.0],_
--R Type: Matrix(DoubleFloat)
--E 99
---S 100 of 121
+--S 100 of 127
t2:=g1*a
--R
--R + 7.810249675906654 4.4812907976513596 2.5607375986579197+
@@ -1136,7 +1136,7 @@ t2:=g1*a
--R Type: Matrix(DoubleFloat)
--E 100
---S 101 of 121
+--S 101 of 127
t3:=drotg(elt(t2,2,2),elt(a,3,2),0.0,0.0)
--R
--R (5)
@@ -1145,7 +1145,7 @@ t3:=drotg(elt(t2,2,2),elt(a,3,2),0.0,0.0)
--R Type: PrimitiveArray(DoubleFloat)
--E 101
---S 102 of 121
+--S 102 of 127
g2:MATRIX(DFLOAT):=[[1.0, 0.0, 0.0],_
[0.0, elt(t3,2),elt(t3,3)],_
[0.0,-elt(t3,3),elt(t3,2)]]
@@ -1159,7 +1159,7 @@ g2:MATRIX(DFLOAT):=[[1.0, 0.0, 0.0],_
--R Type: Matrix(DoubleFloat)
--E 102
---S 103 of 121
+--S 103 of 127
g2*g1*a
--R
--R + 7.810249675906654 4.4812907976513596 2.5607375986579197 +
@@ -1170,7 +1170,7 @@ g2*g1*a
--R Type: Matrix(DoubleFloat)
--E 103
---S 104 of 121
+--S 104 of 127
q:=transpose(g1)*transpose(g2)
--R
--R +0.76822127959737585 0.33265417936007158 0.54697098874441952 +
@@ -1183,21 +1183,21 @@ q:=transpose(g1)*transpose(g2)
)clear all
---S 105 of 121
+--S 105 of 127
dx:PRIMARR(DFLOAT):=[[6,0, 1.0, 4.0, -1.0, -1.0]]
--R
--R (1) [6.,0.,1.,4.,- 1.,- 1.]
--R Type: PrimitiveArray(DoubleFloat)
--E 105
---S 106 of 121
+--S 106 of 127
dy:PRIMARR(DFLOAT):=[[5.0, 1.0, -4.0, 4.0, -4.0]]
--R
--R (2) [5.,1.,- 4.,4.,- 4.]
--R Type: PrimitiveArray(DoubleFloat)
--E 106
---S 107 of 121
+--S 107 of 127
drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate by 45 degrees
--R
--R (3)
@@ -1212,7 +1212,7 @@ drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate by 45 degrees
--R Type: List(PrimitiveArray(DoubleFloat))
--E 107
---S 108 of 121
+--S 108 of 127
[dx,dy] -- note that the input arguments, dx and dy were modified
--R
--R (4)
@@ -1227,7 +1227,7 @@ drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate by 45 degrees
--R Type: List(PrimitiveArray(DoubleFloat))
--E 108
---S 109 of 121
+--S 109 of 127
drot(5,dx,1,dy,1,0.707106781,-0.707106781) -- rotate by -45 degrees
--R
--R (5)
@@ -1242,7 +1242,7 @@ drot(5,dx,1,dy,1,0.707106781,-0.707106781) -- rotate by -45 degrees
--R Type: List(PrimitiveArray(DoubleFloat))
--E 109
---S 110 of 121
+--S 110 of 127
[dx,dy] -- note that the input arguments, dx and dy were modified
--R
--R (6)
@@ -1257,21 +1257,21 @@ drot(5,dx,1,dy,1,0.707106781,-0.707106781) -- rotate by -45 degrees
--R Type: List(PrimitiveArray(DoubleFloat))
--E 110
---S 111 of 121
+--S 111 of 127
dx:PRIMARR(DFLOAT):=[[6,0, 1.0, 4.0, -1.0, -1.0]]
--R
--R (7) [6.,0.,1.,4.,- 1.,- 1.]
--R Type: PrimitiveArray(DoubleFloat)
--E 111
---S 112 of 121
+--S 112 of 127
dy:PRIMARR(DFLOAT):=[[5.0, 1.0, -4.0, 4.0, -4.0]]
--R
--R (8) [5.,1.,- 4.,4.,- 4.]
--R Type: PrimitiveArray(DoubleFloat)
--E 112
---S 113 of 121
+--S 113 of 127
drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate by 45 degrees
--R
--R (9)
@@ -1286,7 +1286,7 @@ drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate by 45 degrees
--R Type: List(PrimitiveArray(DoubleFloat))
--E 113
---S 114 of 121
+--S 114 of 127
drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate to 90 degrees
--R
--R (10)
@@ -1301,7 +1301,7 @@ drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate to 90 degrees
--R Type: List(PrimitiveArray(DoubleFloat))
--E 114
---S 115 of 121
+--S 115 of 127
drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate to 135 degrees
--R
--R (11)
@@ -1316,7 +1316,7 @@ drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate to 135 degrees
--R Type: List(PrimitiveArray(DoubleFloat))
--E 115
---S 116 of 121
+--S 116 of 127
drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate to 180 degrees
--R
--R (12)
@@ -1331,7 +1331,7 @@ drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate to 180 degrees
--R Type: List(PrimitiveArray(DoubleFloat))
--E 116
---S 117 of 121
+--S 117 of 127
drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate to 225 degrees
--R
--R (13)
@@ -1346,7 +1346,7 @@ drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate to 225 degrees
--R Type: List(PrimitiveArray(DoubleFloat))
--E 117
---S 118 of 121
+--S 118 of 127
drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate to 270 degrees
--R
--R (14)
@@ -1361,7 +1361,7 @@ drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate to 270 degrees
--R Type: List(PrimitiveArray(DoubleFloat))
--E 118
---S 119 of 121
+--S 119 of 127
drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate to 315 degrees
--R
--R (15)
@@ -1376,7 +1376,7 @@ drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate to 315 degrees
--R Type: List(PrimitiveArray(DoubleFloat))
--E 119
---S 120 of 121
+--S 120 of 127
drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate to 360 degrees
--R
--R (16)
@@ -1391,7 +1391,7 @@ drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate to 360 degrees
--R Type: List(PrimitiveArray(DoubleFloat))
--E 120
---S 121 of 121
+--S 121 of 127
[dx,dy] -- note that the input arguments, dx and dy were modified
--R
--R (17)
@@ -1405,6 +1405,50 @@ drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate to 360 degrees
--R ]
--R Type: List(PrimitiveArray(DoubleFloat))
--E 121
+
+)clear all
+--S 122 of 127
+dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]]
+--R
+--R (1) [1.,2.,3.,4.,5.,6.]
+--R Type: PrimitiveArray(DoubleFloat)
+--E 122
+
+--S 123 of 127
+dscal(6,2.0,dx,1)
+--R
+--R (2) [2.,4.,6.,8.,10.,12.]
+--R Type: PrimitiveArray(DoubleFloat)
+--E 123
+
+--S 124 of 127
+dx
+--R
+--R (3) [2.,4.,6.,8.,10.,12.]
+--R Type: PrimitiveArray(DoubleFloat)
+--E 124
+
+--S 125 of 127
+dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]]
+--R
+--R (4) [1.,2.,3.,4.,5.,6.]
+--R Type: PrimitiveArray(DoubleFloat)
+--E 125
+
+--S 126 of 127
+dscal(3,0.5,dx,1)
+--R
+--R (5) [0.5,1.,1.5,4.,5.,6.]
+--R Type: PrimitiveArray(DoubleFloat)
+--E 126
+
+--S 127 of 127
+dx
+--R
+--R (6) [0.5,1.,1.5,4.,5.,6.]
+--R Type: PrimitiveArray(DoubleFloat)
+--E 127
+
)spool
)lisp (bye)
\end{chunk}
@@ -1562,6 +1606,18 @@ BlasLevelOne() : Exports == Implementation where
++X dx -- dx has been modified
++X dy -- dy has been modified
+ dscal: (SI, DF, DX, SI) -> DX
+ ++ dscal scales each element of the vector by the scalar so
+ ++ dscal(n,da,dx,incx) = da*dx for n elements, incremented by incx
+ ++ Note that the dx array is modified in place.
+ ++
+ ++X dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]]
+ ++X dscal(6,2.0,dx,1)
+ ++X dx
+ ++X dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]]
+ ++X dscal(3,0.5,dx,1)
+ ++X dx
+
Implementation == add
dcabs1(z:CDF):DF ==
@@ -1580,6 +1636,8 @@ BlasLevelOne() : Exports == Implementation where
DROTG(a,b,c,s)$Lisp
drot(n:SI,dx:DX,incx:SI,dy:DX,incy:SI,c:DF,s:DF):LDX ==
DROT(n,dx,incx,dy,incy,c,s)$Lisp
+ dscal(n:SI,da:DF,dx:DX,incx:SI):DX ==
+ DSCAL(n,da,dx,incx)$Lisp
\end{chunk}
\begin{chunk}{BLAS1.dotabb}
@@ -5380,16 +5438,8 @@ c
write(6,1)
1 format(/,"rotate by 45, -45")
- dx(1)=6.0d0
- dy(1)=5.0d0
- dx(2)=1.0d0
- dy(2)=1.0d0
- dx(3)=4.0d0
- dy(3)=-4.0d0
- dx(4)=-1.0d0
- dy(4)=4.0d0
- dx(5)=-1.0d0
- dy(5)=-4.0d0
+ dx= (/ 6.0d0, 1.0d0, 4.0d0, 1.0d0, -1.0d0 /)
+ dy= (/ 5.0d0, 1.0d0, -4.0d0, 4.0d0, -4.0d0 /)
write(6,10)dx(1),dy(1)
10 format(/,"dx(1)=",f6.3," dy(1)=",f6.3)
write(6,20)dx(2),dy(2)
@@ -5415,16 +5465,8 @@ c
write(6,2)
2 format(/,"rotate by 45, -45, only some members")
- dx(1)=6.0d0
- dy(1)=5.0d0
- dx(2)=1.0d0
- dy(2)=1.0d0
- dx(3)=4.0d0
- dy(3)=-4.0d0
- dx(4)=-1.0d0
- dy(4)=4.0d0
- dx(5)=-1.0d0
- dy(5)=-4.0d0
+ dx= (/ 6.0d0, 1.0d0, 4.0d0, 1.0d0, -1.0d0 /)
+ dy= (/ 5.0d0, 1.0d0, -4.0d0, 4.0d0, -4.0d0 /)
write(6,10)dx(1),dy(1)
write(6,20)dx(2),dy(2)
write(6,30)dx(3),dy(3)
@@ -5445,16 +5487,8 @@ c
write(6,3)
3 format(/,"rotate by 360")
- dx(1)=6.0d0
- dy(1)=5.0d0
- dx(2)=1.0d0
- dy(2)=1.0d0
- dx(3)=4.0d0
- dy(3)=-4.0d0
- dx(4)=-1.0d0
- dy(4)=4.0d0
- dx(5)=-1.0d0
- dy(5)=-4.0d0
+ dx= (/ 6.0d0, 1.0d0, 4.0d0, 1.0d0, -1.0d0 /)
+ dy= (/ 5.0d0, 1.0d0, -4.0d0, 4.0d0, -4.0d0 /)
write(6,10)dx(1),dy(1)
write(6,20)dx(2),dy(2)
write(6,30)dx(3),dy(3)
@@ -5511,16 +5545,8 @@ c
write(6,4)
4 format(/,"rotate by 45, from end")
- dx(1)=6.0d0
- dy(1)=5.0d0
- dx(2)=1.0d0
- dy(2)=1.0d0
- dx(3)=4.0d0
- dy(3)=-4.0d0
- dx(4)=-1.0d0
- dy(4)=4.0d0
- dx(5)=-1.0d0
- dy(5)=-4.0d0
+ dx= (/ 6.0d0, 1.0d0, 4.0d0, 1.0d0, -1.0d0 /)
+ dy= (/ 5.0d0, 1.0d0, -4.0d0, 4.0d0, -4.0d0 /)
write(6,10)dx(1),dy(1)
write(6,20)dx(2),dy(2)
write(6,30)dx(3),dy(3)
@@ -5653,6 +5679,7 @@ dx(5)=-1.000 dy(5)=-4.000
\begin{chunk}{BLAS 1 drot}
(defun drot (n dx incx dy incy c s)
+; Tim Daly May 4, 2012
(declare (type (double-float) c s)
(type (simple-array double-float (*)) dx dy)
(type fixnum incy incx n))
@@ -5794,6 +5821,49 @@ dx(5)=-1.000 dy(5)=-4.000
)set message auto off
)clear all
+--S 1 of 6
+dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]]
+--R
+--R (1) [1.,2.,3.,4.,5.,6.]
+--R Type: PrimitiveArray(DoubleFloat)
+--E 1
+
+--S 2 of 6
+dscal(6,2.0,dx,1)
+--R
+--R (2) [2.,4.,6.,8.,10.,12.]
+--R Type: PrimitiveArray(DoubleFloat)
+--E 2
+
+--S 3 of 6
+dx
+--R
+--R (3) [2.,4.,6.,8.,10.,12.]
+--R Type: PrimitiveArray(DoubleFloat)
+--E 3
+
+--S 4 of 6
+dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]]
+--R
+--R (4) [1.,2.,3.,4.,5.,6.]
+--R Type: PrimitiveArray(DoubleFloat)
+--E 4
+
+--S 5 of 6
+dscal(3,0.5,dx,1)
+--R
+--R (5) [0.5,1.,1.5,4.,5.,6.]
+--R Type: PrimitiveArray(DoubleFloat)
+--E 5
+
+--S 6 of 6
+dx
+--R
+--R (6) [0.5,1.,1.5,4.,5.,6.]
+--R Type: PrimitiveArray(DoubleFloat)
+--E 6
+
+
)spool
)lisp (bye)
\end{chunk}
@@ -5802,6 +5872,73 @@ dx(5)=-1.000 dy(5)=-4.000
dscal examples
====================================================================
+Given an initial array
+
+dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]]
+
+ [1.,2.,3.,4.,5.,6.]
+
+scale each element by 2.0
+
+dscal(6,2.0,dx,1)
+
+ [2.,4.,6.,8.,10.,12.]
+
+Note that this changes the initial array in place.
+
+dx
+
+ [2.,4.,6.,8.,10.,12.]
+
+Given the initial array
+
+dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]]
+
+ [1.,2.,3.,4.,5.,6.]
+
+scale each element by 0.5
+
+dscal(6,0.5,dx,1)
+
+ [0.5,1.,1.5,2.,2.5,3.]
+
+Given the initial array
+
+dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]]
+
+ [1.,2.,3.,4.,5.,6.]
+
+scale the first three elements by 0.5
+
+dscal(3,0.5,dx,1)
+
+ [0.5,1.,1.5,4.,5.,6.]
+
+Given the initial array
+
+dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]]
+
+ [1.,2.,3.,4.,5.,6.]
+
+dscal will do nothing with a negative count
+
+dscal(-3,0.5,dx,1)
+
+ [1.,2.,3.,4.,5.,6.]
+
+Given the initial array
+
+dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]]
+
+ [1.,2.,3.,4.,5.,6.]
+
+dscal will do nothing with a negative increment
+
+dscal(3,0.5,dx,-1)
+
+ [1.,2.,3.,4.,5.,6.]
+
+
====================================================================
Man Page Details
====================================================================
@@ -5843,12 +5980,6 @@ ARGUMENTS
Increment between elements of x.
If incx = 0, the results will be unpredictable.
-NOTES
- When working backward (incx < 0 or incy < 0), each routine starts at
- the end of the vector and moves backward, as follows:
-
- x(1-incx * (n-1)), x(1-incx * (n-2)), ..., x(1)
-
\end{chunk}
\begin{chunk}{dscal.f}
@@ -5898,78 +6029,131 @@ c
\end{chunk}
+\begin{chunk}{drotg example}
+ program dscalEX
+* Tim Daly May 6, 2012
+* unit tests for BLAS dscal
+ double precision a(6)
+ double precision b
+ a = (/ 1.0D0, 2.0D0, 3.0D0, 4.0D0, 5.0D0, 6.0D0 /)
+
+ write(6,10)
+ 10 format(/,"the initial array")
+ write(6,100)a(1),a(2),a(3)
+ 100 format("a(1)=",f6.3," a(2)=",f6.3," a(3)=",f6.3)
+ write(6,200)a(4),a(5),a(6)
+ 200 format("a(4)=",f6.3," a(5)=",f6.3," a(6)=",f6.3)
+
+ write(6,11)
+ 11 format(/,"scale whole array by 2.0")
+ call dscal(6,2.0d0,a,1)
+ write(6,100)a(1),a(2),a(3)
+ write(6,200)a(4),a(5),a(6)
+
+ write(6,12)
+ 12 format(/,"scale whole array by 0.5")
+ a = (/ 1.0D0, 2.0D0, 3.0D0, 4.0D0, 5.0D0, 6.0D0 /)
+ call dscal(6,0.5d0,a,1)
+ write(6,100)a(1),a(2),a(3)
+ write(6,200)a(4),a(5),a(6)
+
+ write(6,13)
+ 13 format(/,"scale 3 elements by 0.5")
+ a = (/ 1.0D0, 2.0D0, 3.0D0, 4.0D0, 5.0D0, 6.0D0 /)
+ call dscal(3,0.5d0,a,1)
+ write(6,100)a(1),a(2),a(3)
+ write(6,200)a(4),a(5),a(6)
+
+ write(6,14)
+ 14 format(/,"do nothing. negative length")
+ a = (/ 1.0D0, 2.0D0, 3.0D0, 4.0D0, 5.0D0, 6.0D0 /)
+ call dscal(-3,0.5d0,a,1)
+ write(6,100)a(1),a(2),a(3)
+ write(6,200)a(4),a(5),a(6)
+
+ write(6,15)
+ 15 format(/,"scale 3 elements by -0.5, from end (does nothing)")
+ a = (/ 1.0D0, 2.0D0, 3.0D0, 4.0D0, 5.0D0, 6.0D0 /)
+ call dscal(3,0.5d0,a,-1)
+ write(6,100)a(1),a(2),a(3)
+ write(6,200)a(4),a(5),a(6)
+
+ stop
+ end
+
+\end{chunk}
+
+\begin{verbatim}
+gcc -o dscalEX dscalEX.f -lgfortran dscal.o && ./dscalEX
+
+the initial array
+a(1)= 1.000 a(2)= 2.000 a(3)= 3.000
+a(4)= 4.000 a(5)= 5.000 a(6)= 6.000
+
+scale whole array by 2.0
+a(1)= 2.000 a(2)= 4.000 a(3)= 6.000
+a(4)= 8.000 a(5)=10.000 a(6)=12.000
+
+scale whole array by 0.5
+a(1)= 0.500 a(2)= 1.000 a(3)= 1.500
+a(4)= 2.000 a(5)= 2.500 a(6)= 3.000
+
+scale 3 elements by 0.5
+a(1)= 0.500 a(2)= 1.000 a(3)= 1.500
+a(4)= 4.000 a(5)= 5.000 a(6)= 6.000
+
+do nothing. negative length
+a(1)= 1.000 a(2)= 2.000 a(3)= 3.000
+a(4)= 4.000 a(5)= 5.000 a(6)= 6.000
+
+scale 3 elements by -0.5, from end (does nothing)
+a(1)= 1.000 a(2)= 2.000 a(3)= 3.000
+a(4)= 4.000 a(5)= 5.000 a(6)= 6.000
+\end{verbatim}
+
\begin{chunk}{BLAS 1 dscal}
(defun dscal (n da dx incx)
+; Tim Daly May 6, 2012
(declare (type (simple-array double-float (*)) dx)
(type (double-float) da)
- (type fixnum incx n))
- (f2cl-lib:with-multi-array-data
- ((dx double-float dx-%data% dx-%offset%))
- (prog ((i 0) (m 0) (mp1 0) (nincx 0))
- (declare (type fixnum nincx mp1 m i))
- (if (or (<= n 0) (<= incx 0)) (go end_label))
- (if (= incx 1) (go label20))
- (setf nincx (f2cl-lib:int-mul n incx))
- (f2cl-lib:fdo (i 1 (f2cl-lib:int-add i incx))
- ((> i nincx) nil)
- (tagbody
- (setf (f2cl-lib:fref dx-%data% (i) ((1 *)) dx-%offset%)
- (* da (f2cl-lib:fref dx-%data% (i) ((1 *)) dx-%offset%)))))
- (go end_label)
- label20
- (setf m (mod n 5))
- (if (= m 0) (go label40))
- (f2cl-lib:fdo (i 1 (f2cl-lib:int-add i 1))
- ((> i m) nil)
- (tagbody
- (setf (f2cl-lib:fref dx-%data% (i) ((1 *)) dx-%offset%)
- (* da (f2cl-lib:fref dx-%data% (i) ((1 *)) dx-%offset%)))))
- (if (< n 5) (go end_label))
- label40
- (setf mp1 (f2cl-lib:int-add m 1))
- (f2cl-lib:fdo (i mp1 (f2cl-lib:int-add i 5))
- ((> i n) nil)
- (tagbody
- (setf (f2cl-lib:fref dx-%data% (i) ((1 *)) dx-%offset%)
- (* da (f2cl-lib:fref dx-%data% (i) ((1 *)) dx-%offset%)))
- (setf (f2cl-lib:fref dx-%data%
- ((f2cl-lib:int-add i 1))
- ((1 *))
- dx-%offset%)
- (* da
- (f2cl-lib:fref dx-%data%
- ((f2cl-lib:int-add i 1))
- ((1 *))
- dx-%offset%)))
- (setf (f2cl-lib:fref dx-%data%
- ((f2cl-lib:int-add i 2))
- ((1 *))
- dx-%offset%)
- (* da
- (f2cl-lib:fref dx-%data%
- ((f2cl-lib:int-add i 2))
- ((1 *))
- dx-%offset%)))
- (setf (f2cl-lib:fref dx-%data%
- ((f2cl-lib:int-add i 3))
- ((1 *))
- dx-%offset%)
- (* da
- (f2cl-lib:fref dx-%data%
- ((f2cl-lib:int-add i 3))
- ((1 *))
- dx-%offset%)))
- (setf (f2cl-lib:fref dx-%data%
- ((f2cl-lib:int-add i 4))
- ((1 *))
- dx-%offset%)
- (* da
- (f2cl-lib:fref dx-%data%
- ((f2cl-lib:int-add i 4))
- ((1 *))
- dx-%offset%)))))
- end_label
- (return (values nil nil nil nil)))))
+ (type fixnum n incx))
+ (let ((i 0) (limit (length dx)))
+ (declare (type fixnum limit i))
+ (when (and (> n 0) (> incx 0))
+ (do ((i 0 (the fixnum (+ i incx))))
+ ((or (>= i n) (>= i limit)))
+ (setf (svref dx i)
+ (the double-float (* da (the double-float (svref dx i)))))))
+ dx))
+
+\end{chunk}
+
+\begin{chunk}{BLAS 1 dscal lisp test}
+(load "dscal.lisp")
+(setq a (vector 1.0d0 2.0d0 3.0d0 4.0d0 5.0d0 6.0d0))
+; #(1.0 2.0 3.0 4.0 5.0 6.0)
+(dscal 6 2.0d0 a 1)
+; #(2.0 4.0 6.0 8.0 10.0 12.0)
+
+(setq a (vector 1.0d0 2.0d0 3.0d0 4.0d0 5.0d0 6.0d0))
+; #(1.0 2.0 3.0 4.0 5.0 6.0)
+(dscal 6 0.5d0 a 1)
+; #(0.5 1.0 1.5 2.0 2.5 3.0)
+
+(setq a (vector 1.0d0 2.0d0 3.0d0 4.0d0 5.0d0 6.0d0))
+; #(1.0 2.0 3.0 4.0 5.0 6.0)
+(dscal 3 0.5d0 a 1)
+; #(0.5 1.0 1.5 4.0 5.0 6.0)
+
+(setq a (vector 1.0d0 2.0d0 3.0d0 4.0d0 5.0d0 6.0d0))
+; #(1.0 2.0 3.0 4.0 5.0 6.0)
+(dscal -3 0.5d0 a 1)
+; #(1.0 2.0 3.0 4.0 5.0 6.0)
+
+(setq a (vector 1.0d0 2.0d0 3.0d0 4.0d0 5.0d0 6.0d0))
+; #(1.0 2.0 3.0 4.0 5.0 6.0)
+(dscal 3 0.5d0 a -1)
+; #(1.0 2.0 3.0 4.0 5.0 6.0)
\end{chunk}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -138370,12 +138554,12 @@ Warning: Types of argument 1 in call to ZLARFB do not match.
\getchunk{BLAS 1 dnrm2}
\getchunk{BLAS 1 drotg}
\getchunk{BLAS 1 drot}
+\getchunk{BLAS 1 dscal}
\end{chunk}
\begin{chunk}{untested}
\getchunk{BLAS lsame}
\getchunk{BLAS xerbla}
-\getchunk{BLAS 1 dscal}
\getchunk{BLAS 1 dswap}
\getchunk{BLAS 1 dzasum}
\getchunk{BLAS 1 dznrm2}
diff --git a/changelog b/changelog
index 03dfa26..00893e5 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20120506 tpd src/axiom-website/patches.html 20120506.01.tpd.patch
+20120506 tpd books/bookvol10.5 BLAS1 dscal
20120505 tpd src/axiom-website/patches.html 20120505.01.tpd.patch
20100505 tpd books/bookvol10.5 BLAS1 drot
20120503 tpd src/axiom-website/patches.html 20120503.01.tpd.patch
diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html
index bd79643..ffb14d6 100644
--- a/src/axiom-website/patches.html
+++ b/src/axiom-website/patches.html
@@ -3904,5 +3904,7 @@ books/bookvol10.3 change HASHEQ to SXHASH
books/bookvol10.5 BLAS1 drotg
20120505.01.tpd.patch
books/bookvol10.5 BLAS1 drot
+20120506.01.tpd.patch
+books/bookvol10.5 BLAS1 dscal