diff --git a/books/bookvol10.5.pamphlet b/books/bookvol10.5.pamphlet
index eb448e3..62240ec 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 136
+--S 1 of 140
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 136
+--S 2 of 140
dcabs1(t1)
--R
--R
@@ -364,7 +364,7 @@ dcabs1(t1)
--R Type: DoubleFloat
--E 2
---S 3 of 136
+--S 3 of 140
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 136
+--S 4 of 140
dcabs1(t2)
--R
--R
@@ -380,7 +380,7 @@ dcabs1(t2)
--R Type: DoubleFloat
--E 4
---S 5 of 136
+--S 5 of 140
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 136
+--S 6 of 140
dcabs1(t3)
--R
--R
@@ -396,7 +396,7 @@ dcabs1(t3)
--R Type: DoubleFloat
--E 6
---S 7 of 136
+--S 7 of 140
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 136
+--S 8 of 140
dcabs1(t4)
--R
--R
@@ -412,7 +412,7 @@ dcabs1(t4)
--R Type: DoubleFloat
--E 8
---S 9 of 136
+--S 9 of 140
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 136
+--S 10 of 140
dcabs1(t5)
--R
--R
@@ -430,196 +430,196 @@ dcabs1(t5)
)clear all
---S 11 of 136
+--S 11 of 140
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 136
+--S 12 of 140
dasum(3,a,-1) -- 0.0 neg incx
--R
--R (2) 0.
--R Type: DoubleFloat
--E 12
---S 13 of 136
+--S 13 of 140
dasum(3,a,0) -- 0.0 zero incx
--R
--R (3) 0.
--R Type: DoubleFloat
--E 13
---S 14 of 136
+--S 14 of 140
dasum(-1,a,1) -- 0.0 neg elements
--R
--R (4) 0.
--R Type: DoubleFloat
--E 14
---S 15 of 136
+--S 15 of 140
dasum(0,a,1) -- 0.0 no elements
--R
--R (5) 0.
--R Type: DoubleFloat
--E 15
---S 16 of 136
+--S 16 of 140
dasum(1,a,1) -- 1.0 1.0
--R
--R (6) 1.
--R Type: DoubleFloat
--E 16
---S 17 of 136
+--S 17 of 140
dasum(2,a,1) -- 3.0 1.0+2.0
--R
--R (7) 3.
--R Type: DoubleFloat
--E 17
---S 18 of 136
+--S 18 of 140
dasum(3,a,1) -- 6.0 1.0+2.0+3.0
--R
--R (8) 6.
--R Type: DoubleFloat
--E 18
---S 19 of 136
+--S 19 of 140
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 136
+--S 20 of 140
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 136
+--S 21 of 140
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 136
+--S 22 of 140
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 136
+--S 23 of 140
dasum(1,a,2) -- 1.0 1.0
--R
--R (13) 1.
--R Type: DoubleFloat
--E 23
---S 24 of 136
+--S 24 of 140
dasum(2,a,2) -- 4.0 1.0+3.0
--R
--R (14) 4.
--R Type: DoubleFloat
--E 24
---S 25 of 136
+--S 25 of 140
dasum(3,a,2) -- 9.0 1.0+3.0+5.0
--R
--R (15) 4.
--R Type: DoubleFloat
--E 25
---S 26 of 136
+--S 26 of 140
dasum(4,a,2) -- 9.0 1.0+3.0+5.0
--R
--R (16) 4.
--R Type: DoubleFloat
--E 26
---S 27 of 136
+--S 27 of 140
dasum(1,a,3) -- 1.0 1.0
--R
--R (17) 1.
--R Type: DoubleFloat
--E 27
---S 28 of 136
+--S 28 of 140
dasum(2,a,3) -- 5.0 1.0+4.0
--R
--R (18) 5.
--R Type: DoubleFloat
--E 28
---S 29 of 136
+--S 29 of 140
dasum(3,a,3) -- 5.0 1.0+4.0
--R
--R (19) 5.
--R Type: DoubleFloat
--E 29
---S 30 of 136
+--S 30 of 140
dasum(1,a,4) -- 1.0 1.0
--R
--R (20) 1.
--R Type: DoubleFloat
--E 30
---S 31 of 136
+--S 31 of 140
dasum(2,a,4) -- 6.0 1.0+5.0
--R
--R (21) 1.
--R Type: DoubleFloat
--E 31
---S 32 of 136
+--S 32 of 140
dasum(3,a,4) -- 6.0 1.0+5.0
--R
--R (22) 1.
--R Type: DoubleFloat
--E 32
---S 33 of 136
+--S 33 of 140
dasum(1,a,5) -- 1.0 1.0
--R
--R (23) 1.
--R Type: DoubleFloat
--E 33
---S 34 of 136
+--S 34 of 140
dasum(2,a,5) -- 7.0 1.0+6.0
--R
--R (24) 6.
--R Type: DoubleFloat
--E 34
---S 35 of 136
+--S 35 of 140
dasum(3,a,5) -- 7.0 1.0+6.0
--R
--R (25) 6.
--R Type: DoubleFloat
--E 35
---S 36 of 136
+--S 36 of 140
dasum(1,a,6) -- 1.0 1.0
--R
--R (26) 1.
--R Type: DoubleFloat
--E 36
---S 37 of 136
+--S 37 of 140
dasum(2,a,6) -- 1.0 1.0
--R
--R (27) 1.
--R Type: DoubleFloat
--E 37
---S 38 of 136
+--S 38 of 140
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 136
+--S 39 of 140
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 136
+--S 40 of 140
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 136
+--S 41 of 140
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 136
+--S 42 of 140
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 136
+--S 43 of 140
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 136
+--S 44 of 140
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 136
+--S 45 of 140
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 136
+--S 46 of 140
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 136
+--S 47 of 140
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 136
+--S 48 of 140
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 136
+--S 49 of 140
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 136
+--S 50 of 140
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 136
+--S 51 of 140
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 136
+--S 52 of 140
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 136
+--S 53 of 140
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 136
+--S 54 of 140
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 136
+--S 55 of 140
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 136
+--S 56 of 140
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 136
+--S 57 of 140
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 136
+--S 58 of 140
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 136
+--S 59 of 140
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 136
+--S 60 of 140
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 136
+--S 61 of 140
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 136
+--S 62 of 140
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 136
+--S 63 of 140
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 136
+--S 64 of 140
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 136
+--S 65 of 140
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 136
+--S 66 of 140
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 136
+--S 67 of 140
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 136
+--S 68 of 140
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 136
+--S 69 of 140
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 136
+--S 70 of 140
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 136
+--S 71 of 140
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 136
+--S 72 of 140
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 136
+--S 73 of 140
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 136
+--S 74 of 140
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 136
+--S 75 of 140
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 136
+--S 76 of 140
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 136
+--S 77 of 140
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 136
+--S 78 of 140
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 136
+--S 79 of 140
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 136
+--S 80 of 140
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 136
+--S 81 of 140
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 136
+--S 82 of 140
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 136
+--S 83 of 140
dcopy(5,a,1,b,1)
--R
--R
@@ -997,63 +997,63 @@ dcopy(5,a,1,b,1)
)clear all
---S 84 of 136
+--S 84 of 140
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 136
+--S 85 of 140
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 136
+--S 86 of 140
ddot(0,a,1,b,1)
--R
--R (3) 0.
--R Type: DoubleFloat
--E 86
---S 87 of 136
+--S 87 of 140
ddot(3,a,1,b,1)
--R
--R (4) 38.
--R Type: DoubleFloat
--E 87
---S 88 of 136
+--S 88 of 140
ddot(3,a,1,b,2)
--R
--R (5) 46.
--R Type: DoubleFloat
--E 88
---S 89 of 136
+--S 89 of 140
ddot(3,a,2,b,1)
--R
--R (6) 58.
--R Type: DoubleFloat
--E 89
---S 90 of 136
+--S 90 of 140
ddot(3,a,1,b,-2)
--R
--R (7) 38.
--R Type: DoubleFloat
--E 90
---S 91 of 136
+--S 91 of 140
ddot(3,a,-2,b,1)
--R
--R (8) 50.
--R Type: DoubleFloat
--E 91
---S 92 of 136
+--S 92 of 140
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 136
+--S 93 of 140
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 136
+--S 94 of 140
dnrm2(3,a,1)
--R
--R (2) 7.0710678118654755
--R Type: DoubleFloat
--E 94
---S 95 of 136
+--S 95 of 140
dnrm2(5,a,1)
--R
--R (3) 13.416407864998739
--R Type: DoubleFloat
--E 95
---S 96 of 136
+--S 96 of 140
dnrm2(3,a,2)
--R
--R (4) 10.723805294763608
@@ -1091,7 +1091,7 @@ dnrm2(3,a,2)
--E 96
)clear all
---S 97 of 136
+--S 97 of 140
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 136
+--S 98 of 140
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 136
+--S 99 of 140
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 136
+--S 100 of 140
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 136
+--S 101 of 140
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 136
+--S 102 of 140
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 136
+--S 103 of 140
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 136
+--S 104 of 140
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 136
+--S 105 of 140
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 136
+--S 106 of 140
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 136
+--S 107 of 140
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 136
+--S 108 of 140
[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 136
+--S 109 of 140
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 136
+--S 110 of 140
[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 136
+--S 111 of 140
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 136
+--S 112 of 140
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 136
+--S 113 of 140
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 136
+--S 114 of 140
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 136
+--S 115 of 140
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 136
+--S 116 of 140
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 136
+--S 117 of 140
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 136
+--S 118 of 140
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 136
+--S 119 of 140
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 136
+--S 120 of 140
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 136
+--S 121 of 140
[dx,dy] -- note that the input arguments, dx and dy were modified
--R
--R (17)
@@ -1407,42 +1407,42 @@ drot(5,dx,1,dy,1,0.707106781,0.707106781) -- rotate to 360 degrees
--E 121
)clear all
---S 122 of 136
+--S 122 of 140
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 136
+--S 123 of 140
dscal(6,2.0,dx,1)
--R
--R (2) [2.,4.,6.,8.,10.,12.]
--R Type: PrimitiveArray(DoubleFloat)
--E 123
---S 124 of 136
+--S 124 of 140
dx
--R
--R (3) [2.,4.,6.,8.,10.,12.]
--R Type: PrimitiveArray(DoubleFloat)
--E 124
---S 125 of 136
+--S 125 of 140
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 136
+--S 126 of 140
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 136
+--S 127 of 140
dx
--R
--R (6) [0.5,1.,1.5,4.,5.,6.]
@@ -1451,69 +1451,99 @@ dx
)clear all
---S 128 of 136
+--S 128 of 140
dx: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 128
---S 129 of 136
+--S 129 of 140
dy:PRIMARR(DFLOAT):=[[9.0, 8.0, 7.0, 6.0, -5.0]]
--R
--R (2) [9.,8.,7.,6.,- 5.]
--R Type: PrimitiveArray(DoubleFloat)
--E 129
---S 130 of 136
+--S 130 of 140
dswap(5,dx,1,dy,1)
--R
--R (3) [[9.,8.,7.,6.,- 5.],[1.,2.,3.,4.,5.]]
--R Type: List(PrimitiveArray(DoubleFloat))
--E 130
---S 131 of 136
+--S 131 of 140
dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0]]
--R
--R (4) [1.,2.,3.,4.,5.]
--R Type: PrimitiveArray(DoubleFloat)
--E 131
---S 132 of 136
+--S 132 of 140
dy:PRIMARR(DFLOAT):=[[9.0, 8.0, 7.0, 6.0, -5.0]]
--R
--R (5) [9.,8.,7.,6.,- 5.]
--R Type: PrimitiveArray(DoubleFloat)
--E 132
---S 133 of 136
+--S 133 of 140
dswap(3,dx,2,dy,2)
--R
--R (6) [[9.,2.,7.,4.,- 5.],[1.,8.,3.,6.,5.]]
--R Type: List(PrimitiveArray(DoubleFloat))
--E 133
---S 134 of 136
+--S 134 of 140
dx:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0]]
--R
--R (7) [1.,2.,3.,4.,5.]
--R Type: PrimitiveArray(DoubleFloat)
--E 134
---S 135 of 136
+--S 135 of 140
dy:PRIMARR(DFLOAT):=[[9.0, 8.0, 7.0, 6.0, -5.0]]
--R
--R (8) [9.,8.,7.,6.,- 5.]
--R Type: PrimitiveArray(DoubleFloat)
--E 135
---S 136 of 136
+--S 136 of 140
dswap(5,dx,1,dy,-1)
--R
--R (9) [[9.,8.,7.,6.,- 5.],[1.,2.,3.,4.,5.]]
--R Type: List(PrimitiveArray(DoubleFloat))
--E 136
+)clear all
+
+--S 137 of 140
+d:PRIMARR(COMPLEX(DFLOAT)):=[[1.0+2.0*%i,-3.0+4.0*%i,5.0-6.0*%i]]
+--R
+--R (1) [1. + 2. %i,- 3. + 4. %i,5. - 6. %i]
+--R Type: PrimitiveArray(Complex(DoubleFloat))
+--E 137
+
+--S 138 of 140
+dzasum(3,d,1) -- 21.0
+--R
+--R (2) 21.
+--R Type: DoubleFloat
+--E 138
+
+--S 139 of 140
+dzasum(3,d,2) -- 14.0
+--R
+--R (3) 14.
+--R Type: DoubleFloat
+--E 139
+
+--S 140 of 140
+dzasum(-3,d,1) -- 0.0
+--R
+--R (4) 0.
+--R Type: DoubleFloat
+--E 140
+
)spool
)lisp (bye)
\end{chunk}
@@ -1571,11 +1601,12 @@ o )show BlasLevelOne
++ This package provides an interface to the Blas library (level 1)
BlasLevelOne() : Exports == Implementation where
- SI ==> SingleInteger
- DF ==> DoubleFloat
- DX ==> PrimitiveArray(DoubleFloat)
- CDF ==> Complex DoubleFloat
- LDX ==> List(PrimitiveArray(DoubleFloat))
+ SI ==> SingleInteger
+ DF ==> DoubleFloat
+ DX ==> PrimitiveArray(DoubleFloat)
+ CDF ==> Complex(DoubleFloat)
+ LDX ==> List(PrimitiveArray(DoubleFloat))
+ PCDF ==> PrimitiveArray(Complex(DoubleFloat))
Exports == with
@@ -1697,10 +1728,22 @@ BlasLevelOne() : Exports == Implementation where
++X dy:PRIMARR(DFLOAT):=[[1.0, 2.0, 3.0, 4.0, 5.0, 6.0]]
++X dswap(5,dx,1,dy,-1)
+ dzasum: (SI, PCDF, SI) -> DF
+ ++ dzasum takes the sum over all of the array where each
+ ++ element of the array sum is the sum of the absolute
+ ++ value of the real part and the absolute value of the
+ ++ imaginary part of each array element:
+ ++ for i in array do sum = sum + (real(a(i)) + imag(a(i)))
+ ++
+ ++X d:PRIMARR(COMPLEX(DFLOAT)):=[[1.0+2.0*%i,-3.0+4.0*%i,5.0-6.0*%i]]
+ ++X dzasum(3,d,1) -- 21.0
+ ++X dzasum(3,d,2) -- 14.0
+ ++X dzasum(-3,d,1) -- 0.0
+
Implementation == add
dcabs1(z:CDF):DF ==
- DCABS1(z)$Lisp
+ DCABS1(COMPLEX(real(z),imag(z))$Lisp)$Lisp
dasum(n:SI,dx:DX,incx:SI):DF ==
DASUM(n,dx,incx)$Lisp
daxpy(n:SI,da:DF,dx:DX,incx:SI,dy:DX,incy:SI):DX ==
@@ -1719,6 +1762,8 @@ BlasLevelOne() : Exports == Implementation where
DSCAL(n,da,dx,incx)$Lisp
dswap(n:SI,dx:DX,incx:SI,dy:DX,incy:SI):LDX ==
DSWAP(n,dx,incx,dy,incx)$Lisp
+ dzasum(n:SI,dz:PCDF,incx:SI):DF ==
+ DZASUMSPAD(n,dz,incx)$Lisp
\end{chunk}
\begin{chunk}{BLAS1.dotabb}
@@ -1939,17 +1984,17 @@ dcabs1(c)=( 4414.200, 0.000)
(declaim (ftype (function (cons) double-float) dcabs1))
(defun dcabs1 (z)
; Tim Daly April 23, 2012
- "Complex(DoubleFloat) z is a pair where (realpart . imaginarypart).
+ "Complex(DoubleFloat) z is a pair where (realpart . imaginarypart)
+ so the spad caller needs to construct a lisp complex number.
The result is a DoubleFloat (+ (abs (realpart z)) (abs (imagpart z)))"
(the double-float
- (+
- (the double-float (abs (the double-float (car z))))
- (the double-float (abs (the double-float (cdr z)))))))
+ (+ (the double-float (abs (the double-float (realpart z))))
+ (the double-float (abs (the double-float (imagpart z)))))))
\end{chunk}
\begin{chunk}{BLAS 1 dcabs1 test}
-(dcabs1 '(312.100 . 4102.100))
+(dcabs1 #C(312.100 4102.100))
\end{chunk}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -6617,6 +6662,34 @@ dy=(/ 5.000, 4.000, 3.000, 2.000, 1.000/)
)set message auto off
)clear all
+--S 1 of 4
+d:PRIMARR(COMPLEX(DFLOAT)):=[[1.0+2.0*%i,-3.0+4.0*%i,5.0-6.0*%i]]
+--R
+--R (1) [1. + 2. %i,- 3. + 4. %i,5. - 6. %i]
+--R Type: PrimitiveArray(Complex(DoubleFloat))
+--E 1
+
+--S 2 of 4
+dzasum(3,d,1) -- 21.0
+--R
+--R (2) 21.
+--R Type: DoubleFloat
+--E 2
+
+--S 3 of 4
+dzasum(3,d,2) -- 14.0
+--R
+--R (3) 14.
+--R Type: DoubleFloat
+--E 3
+
+--S 4 of 4
+dzasum(-3,d,1) -- 0.0
+--R
+--R (4) 0.
+--R Type: DoubleFloat
+--E 4
+
)spool
)lisp (bye)
\end{chunk}
@@ -6625,6 +6698,22 @@ dy=(/ 5.000, 4.000, 3.000, 2.000, 1.000/)
dzasum examples
====================================================================
+d:PRIMARR(COMPLEX(DFLOAT)):=[[1.0+2.0*%i,-3.0+4.0*%i,5.0-6.0*%i]]
+
+ [1. + 2. %i,- 3. + 4. %i,5. - 6. %i]
+
+dzasum(3,d,1)
+
+ 21. = (1+2) + (abs(-3)+4) + (5+abs(-6))
+
+dzasum(3,d,2)
+
+ 14. = (1+2) + (5+abs(-6))
+
+dzasum(-3,d,1)
+
+ 0. -- never execute for negative arguments
+
====================================================================
Man Page Details
====================================================================
@@ -6676,20 +6765,6 @@ NOTES
Computes (complex double-float) $asum \leftarrow ||re(x)||_1 + ||im(x)||_1$
-Arguments are:
-\begin{itemize}
-\item n - fixnum
-\item dx - array (complex double-float)
-\item incx - fixnum
-\end{itemize}
-
-Return values are:
-\begin{itemize}
-\item 1 nil
-\item 2 nil
-\item 3 nil
-\end{itemize}
-
\begin{chunk}{dzasum.f}
double precision function dzasum(n,zx,incx)
c
@@ -6728,43 +6803,107 @@ c
\end{chunk}
+\begin{chunk}{dzasum example}
+ program dzasumEX
+* Tim Daly May 7, 2012
+* unit tests for BLAS dzasum
+ double complex a(3)
+ double precision b
+ a = (/ (1.0D0,2.0D0), (-3.0D0,4.0D0), (5.0D0,-6.0D0)/)
+
+ write(6,10)
+ 10 format(/,"before:")
+ write(6,100)dble(a(1)),dimag(a(1))
+ 100 format("a(1)=C(",f6.3," ",f6.3,")")
+ write(6,101)dble(a(2)),dimag(a(2))
+ 101 format("a(2)=C(",f6.3," ",f6.3,")")
+ write(6,102)dble(a(3)),dimag(a(3))
+ 102 format("a(3)=C(",f6.3," ",f6.3,")")
+
+ b=dzasum(3,a,1)
+ write(6,11)
+ 11 format(/,"should be 21:")
+ write(6,200)b
+ 200 format("b=",f6.3)
+
+ b=dzasum(3,a,2)
+ write(6,12)
+ 12 format(/,"should be 14:")
+ write(6,200)b
+
+ b=dzasum(-3,a,1)
+ write(6,13)
+ 13 format(/,"should be 0:")
+ write(6,200)b
+
+ stop
+ end
+\end{chunk}
+
+\begin{verbatim}
+gcc -o dzasumEX dzasumEX.f -lgfortran dzasum.o dcabs1.o && ./dzasumEX
+
+before:
+a(1)=C( 1.000 2.000)
+a(2)=C(-3.000 4.000)
+a(3)=C( 5.000 -6.000)
+
+should be 21:
+b=21.000
+
+should be 14:
+b=14.000
+
+should be 0:
+b= 0.000
+
+\end{verbatim}
+
+Spad represents complex numbers as a pair where the car is the real
+part and the cons is the imaginary part. BLAS wants a complex number
+in fortran format. So we have a design choice to make. Either we could
+write all of the BLAS code using Spad internal representation or we
+could follow the BLAS code standard. I've decided to follow the BLAS
+code standard so we need to create thunks to do the data translation.
+
\begin{chunk}{BLAS 1 dzasum}
+(defun dzasumSpad (n zx incx)
+; Tim Daly May 7, 2012
+ (let (result vec)
+ (dotimes (i (length zx))
+ (push (complex (car (svref zx i)) (cdr (svref zx i))) result))
+ (setq vec (make-array (length result) :initial-contents (nreverse result)))
+ (dzasum n vec incx)))
+
(defun dzasum (n zx incx)
- (declare (type (simple-array (complex double-float) (*)) zx)
- (type fixnum incx n))
- (f2cl-lib:with-multi-array-data
- ((zx (complex double-float) zx-%data% zx-%offset%))
- (prog ((i 0) (ix 0) (stemp 0.0) (dzasum 0.0))
+; Tim Daly May 7, 2012
+ (declare (type (simple-array (complex double-float) (*)) zx)
+ (type fixnum incx n))
+ (let ((ix 0) (stemp 0.0d0) (dzasum 0.0d0) (limit (length zx)))
(declare (type (double-float) dzasum stemp)
- (type fixnum ix i))
- (setf dzasum 0.0)
- (setf stemp 0.0)
- (if (or (<= n 0) (<= incx 0)) (go end_label))
- (if (= incx 1) (go label20))
- (setf ix 1)
- (f2cl-lib:fdo (i 1 (f2cl-lib:int-add i 1))
- ((> i n) nil)
- (tagbody
- (setf stemp
- (+ stemp
- (dcabs1
- (f2cl-lib:fref zx-%data% (ix) ((1 *)) zx-%offset%))))
- (setf ix (f2cl-lib:int-add ix incx))))
- (setf dzasum stemp)
- (go end_label)
- label20
- (f2cl-lib:fdo (i 1 (f2cl-lib:int-add i 1))
- ((> i n) nil)
- (tagbody
- (setf stemp
- (+ stemp
- (dcabs1
- (f2cl-lib:fref zx-%data% (i) ((1 *)) zx-%offset%))))))
- (setf dzasum stemp)
- end_label
- (return (values dzasum nil nil nil)))))
+ (type fixnum ix limit))
+ (when (and (> n 0) (> incx 0))
+ (do ((i 0 (1+ i)))
+ ((or (>= i n) (>= ix limit)) nil)
+ (setf dzasum (+ dzasum (the double-float (dcabs1 (svref zx ix)))))
+ (setf ix (+ ix incx))))
+ dzasum))
+
+\end{chunk}
+\begin{chunk}{BLAS 1 dzasum lisp test}
+(load "dzasum.lisp")
+(load "dcabs1.lisp")
+(setq a (vector #C(1.0d0 2.0d0) #C(-3.0d0 4.0d0) #C(5.0d0 -6.0d0)))
+; #(#C(1.0 2.0) #C(-3.0 4.0) #C(5.0 -6.0))
+(dzasum 3 a 1)
+; 21.0
+(dzasum 3 a 2)
+; 14.0
+(dzasum -3 a 1)
+; 0.0
\end{chunk}
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{dznrm2 BLAS}
%\pagehead{dznrm2}{dznrm2}
@@ -138773,12 +138912,12 @@ Warning: Types of argument 1 in call to ZLARFB do not match.
\getchunk{BLAS 1 drot}
\getchunk{BLAS 1 dscal}
\getchunk{BLAS 1 dswap}
+\getchunk{BLAS 1 dzasum}
\end{chunk}
\begin{chunk}{untested}
\getchunk{BLAS lsame}
\getchunk{BLAS xerbla}
-\getchunk{BLAS 1 dzasum}
\getchunk{BLAS 1 dznrm2}
\getchunk{BLAS 1 icamax}
\getchunk{BLAS 1 idamax}
diff --git a/changelog b/changelog
index e6fea88..625da0c 100644
--- a/changelog
+++ b/changelog
@@ -1,4 +1,6 @@
-20120506 tpd src/axiom-website/patches.html 20120507.01.tpd.patch
+20120507 tpd src/axiom-website/patches.html 20120507.02.tpd.patch
+20120507 tpd books/bookvol10.5 BLAS1 dzasum
+20120507 tpd src/axiom-website/patches.html 20120507.01.tpd.patch
20120507 tpd books/bookvol10.5 BLAS1 dswap
20120506 tpd src/axiom-website/patches.html 20120506.01.tpd.patch
20120506 tpd books/bookvol10.5 BLAS1 dscal
diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html
index cce9313..53fc6de 100644
--- a/src/axiom-website/patches.html
+++ b/src/axiom-website/patches.html
@@ -3908,5 +3908,7 @@ books/bookvol10.5 BLAS1 drot
books/bookvol10.5 BLAS1 dscal
20120507.01.tpd.patch
books/bookvol10.5 BLAS1 dswap
+20120507.02.tpd.patch
+books/bookvol10.5 BLAS1 dzasum