diff --git a/books/bookvol10.5.pamphlet b/books/bookvol10.5.pamphlet
index 35828c0..ee2146c 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 92
+--S 1 of 96
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 92
+--S 2 of 96
dcabs1(t1)
--R
--R
@@ -364,7 +364,7 @@ dcabs1(t1)
--R Type: DoubleFloat
--E 2
---S 3 of 92
+--S 3 of 96
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 92
+--S 4 of 96
dcabs1(t2)
--R
--R
@@ -380,7 +380,7 @@ dcabs1(t2)
--R Type: DoubleFloat
--E 4
---S 5 of 92
+--S 5 of 96
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 92
+--S 6 of 96
dcabs1(t3)
--R
--R
@@ -396,7 +396,7 @@ dcabs1(t3)
--R Type: DoubleFloat
--E 6
---S 7 of 92
+--S 7 of 96
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 92
+--S 8 of 96
dcabs1(t4)
--R
--R
@@ -412,7 +412,7 @@ dcabs1(t4)
--R Type: DoubleFloat
--E 8
---S 9 of 92
+--S 9 of 96
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 92
+--S 10 of 96
dcabs1(t5)
--R
--R
@@ -430,196 +430,196 @@ dcabs1(t5)
)clear all
---S 11 of 92
+--S 11 of 96
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 92
+--S 12 of 96
dasum(3,a,-1) -- 0.0 neg incx
--R
--R (2) 0.
--R Type: DoubleFloat
--E 12
---S 13 of 92
+--S 13 of 96
dasum(3,a,0) -- 0.0 zero incx
--R
--R (3) 0.
--R Type: DoubleFloat
--E 13
---S 14 of 92
+--S 14 of 96
dasum(-1,a,1) -- 0.0 neg elements
--R
--R (4) 0.
--R Type: DoubleFloat
--E 14
---S 15 of 92
+--S 15 of 96
dasum(0,a,1) -- 0.0 no elements
--R
--R (5) 0.
--R Type: DoubleFloat
--E 15
---S 16 of 92
+--S 16 of 96
dasum(1,a,1) -- 1.0 1.0
--R
--R (6) 1.
--R Type: DoubleFloat
--E 16
---S 17 of 92
+--S 17 of 96
dasum(2,a,1) -- 3.0 1.0+2.0
--R
--R (7) 3.
--R Type: DoubleFloat
--E 17
---S 18 of 92
+--S 18 of 96
dasum(3,a,1) -- 6.0 1.0+2.0+3.0
--R
--R (8) 6.
--R Type: DoubleFloat
--E 18
---S 19 of 92
+--S 19 of 96
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 92
+--S 20 of 96
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 92
+--S 21 of 96
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 92
+--S 22 of 96
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 92
+--S 23 of 96
dasum(1,a,2) -- 1.0 1.0
--R
--R (13) 1.
--R Type: DoubleFloat
--E 23
---S 24 of 92
+--S 24 of 96
dasum(2,a,2) -- 4.0 1.0+3.0
--R
--R (14) 4.
--R Type: DoubleFloat
--E 24
---S 25 of 92
+--S 25 of 96
dasum(3,a,2) -- 9.0 1.0+3.0+5.0
--R
--R (15) 4.
--R Type: DoubleFloat
--E 25
---S 26 of 92
+--S 26 of 96
dasum(4,a,2) -- 9.0 1.0+3.0+5.0
--R
--R (16) 4.
--R Type: DoubleFloat
--E 26
---S 27 of 92
+--S 27 of 96
dasum(1,a,3) -- 1.0 1.0
--R
--R (17) 1.
--R Type: DoubleFloat
--E 27
---S 28 of 92
+--S 28 of 96
dasum(2,a,3) -- 5.0 1.0+4.0
--R
--R (18) 5.
--R Type: DoubleFloat
--E 28
---S 29 of 92
+--S 29 of 96
dasum(3,a,3) -- 5.0 1.0+4.0
--R
--R (19) 5.
--R Type: DoubleFloat
--E 29
---S 30 of 92
+--S 30 of 96
dasum(1,a,4) -- 1.0 1.0
--R
--R (20) 1.
--R Type: DoubleFloat
--E 30
---S 31 of 92
+--S 31 of 96
dasum(2,a,4) -- 6.0 1.0+5.0
--R
--R (21) 1.
--R Type: DoubleFloat
--E 31
---S 32 of 92
+--S 32 of 96
dasum(3,a,4) -- 6.0 1.0+5.0
--R
--R (22) 1.
--R Type: DoubleFloat
--E 32
---S 33 of 92
+--S 33 of 96
dasum(1,a,5) -- 1.0 1.0
--R
--R (23) 1.
--R Type: DoubleFloat
--E 33
---S 34 of 92
+--S 34 of 96
dasum(2,a,5) -- 7.0 1.0+6.0
--R
--R (24) 6.
--R Type: DoubleFloat
--E 34
---S 35 of 92
+--S 35 of 96
dasum(3,a,5) -- 7.0 1.0+6.0
--R
--R (25) 6.
--R Type: DoubleFloat
--E 35
---S 36 of 92
+--S 36 of 96
dasum(1,a,6) -- 1.0 1.0
--R
--R (26) 1.
--R Type: DoubleFloat
--E 36
---S 37 of 92
+--S 37 of 96
dasum(2,a,6) -- 1.0 1.0
--R
--R (27) 1.
--R Type: DoubleFloat
--E 37
---S 38 of 92
+--S 38 of 96
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 92
+--S 39 of 96
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 92
+--S 40 of 96
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 92
+--S 41 of 96
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 92
+--S 42 of 96
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 92
+--S 43 of 96
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 92
+--S 44 of 96
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 92
+--S 45 of 96
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 92
+--S 46 of 96
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 92
+--S 47 of 96
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 92
+--S 48 of 96
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 92
+--S 49 of 96
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 92
+--S 50 of 96
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 92
+--S 51 of 96
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 92
+--S 52 of 96
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 92
+--S 53 of 96
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 92
+--S 54 of 96
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 92
+--S 55 of 96
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 92
+--S 56 of 96
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 92
+--S 57 of 96
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 92
+--S 58 of 96
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 92
+--S 59 of 96
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 92
+--S 60 of 96
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 92
+--S 61 of 96
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 92
+--S 62 of 96
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 92
+--S 63 of 96
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 92
+--S 64 of 96
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 92
+--S 65 of 96
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 92
+--S 66 of 96
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 92
+--S 67 of 96
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 92
+--S 68 of 96
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 92
+--S 69 of 96
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 92
+--S 70 of 96
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 92
+--S 71 of 96
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 92
+--S 72 of 96
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 92
+--S 73 of 96
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 92
+--S 74 of 96
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 92
+--S 75 of 96
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 92
+--S 76 of 96
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 92
+--S 77 of 96
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 92
+--S 78 of 96
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 92
+--S 79 of 96
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 92
+--S 80 of 96
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 92
+--S 81 of 96
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 92
+--S 82 of 96
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 92
+--S 83 of 96
dcopy(5,a,1,b,1)
--R
--R
@@ -997,69 +997,99 @@ dcopy(5,a,1,b,1)
)clear all
---S 84 of 92
+--S 84 of 96
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 92
+--S 85 of 96
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 92
+--S 86 of 96
ddot(0,a,1,b,1)
--R
--R (3) 0.
--R Type: DoubleFloat
--E 86
---S 87 of 92
+--S 87 of 96
ddot(3,a,1,b,1)
--R
--R (4) 38.
--R Type: DoubleFloat
--E 87
---S 88 of 92
+--S 88 of 96
ddot(3,a,1,b,2)
--R
--R (5) 46.
--R Type: DoubleFloat
--E 88
---S 89 of 92
+--S 89 of 96
ddot(3,a,2,b,1)
--R
--R (6) 58.
--R Type: DoubleFloat
--E 89
---S 90 of 92
+--S 90 of 96
ddot(3,a,1,b,-2)
--R
--R (7) 38.
--R Type: DoubleFloat
--E 90
---S 91 of 92
+--S 91 of 96
ddot(3,a,-2,b,1)
--R
--R (8) 50.
--R Type: DoubleFloat
--E 91
---S 92 of 92
+--S 92 of 96
ddot(3,a,-2,b,-2)
--R
--R (9) 71.
--R Type: DoubleFloat
--E 92
+)clear all
+
+--S 93 of 96
+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 96
+dnrm2(3,a,1)
+--R
+--R (2) 7.0710678118654755
+--R Type: DoubleFloat
+--E 94
+
+--S 95 of 96
+dnrm2(5,a,1)
+--R
+--R (3) 13.416407864998739
+--R Type: DoubleFloat
+--E 95
+
+--S 96 of 96
+dnrm2(3,a,2)
+--R
+--R (4) 10.72380529476361
+--R Type: DoubleFloat
+--E 96
+
)spool
)lisp (bye)
\end{chunk}
@@ -1183,6 +1213,14 @@ BlasLevelOne() : Exports == Implementation where
++X ddot(2,a,-2,b,1) -- increment = -2 in a (5,3,1) * (5,6,7) ==> 50.0
++X ddot(3,a,-2,b,-2) -- (5,3,1) * (9,7,5) ==> 71.0
+ dnrm2: (SI, DX, SI) -> DF
+ ++ dnrm2 takes the norm of the vector, ||x||
+ ++
+ ++X a:PRIMARR(DFLOAT):=[ [3.0, -4.0, 5.0, -7.0, 9.0] ]
+ ++X dnrm2(3,a,1) -- 7.0710678118654755 = sqrt(3.0^2 + -4.0^2 + 5.0^2)
+ ++X dnrm2(5,a,1) -- 13.416407864998739 = sqrt(180.0)
+ ++X dnrm2(3,a,2) -- 10.72380529476361 = sqrt(115.0)
+
Implementation == add
dcabs1(z:CDF):DF ==
@@ -1195,6 +1233,8 @@ BlasLevelOne() : Exports == Implementation where
DCOPY(n,dx,incx,dy,incy)$Lisp
ddot(n:SI,dx:DX,incx:SI,dy:DX,incy:SI):DF ==
DDOT(n,dx,incx,dy,incy)$Lisp
+ dnrm2(n:SI,dx:DX,incx:SI):DF ==
+ DNRM2(n,dx,incx)$Lisp
\end{chunk}
\begin{chunk}{BLAS1.dotabb}
@@ -1402,7 +1442,9 @@ c NEW
\end{chunk}
\begin{chunk}{BLAS 1 dcabs1}
+(declaim (ftype (function (cons) double-float) dcabs1))
(defun dcabs1 (z)
+ ; Tim Daly April 23, 2012
"Complex(DoubleFloat) z is a pair where (realpart . imaginarypart).
The result is a DoubleFloat (+ (abs (realpart z)) (abs (imagpart z)))"
(the double-float
@@ -2155,7 +2197,10 @@ c
\end{chunk}
\begin{chunk}{BLAS 1 dasum}
+(declaim (ftype (function (fixnum (simple-array double-float (*)) fixnum)
+ double-float) dasum))
(defun dasum (n dx incx)
+ ; Tim Daly April 24, 2012
(declare (type (simple-array double-float (*)) dx) (type fixnum incx n))
(let ((dasum 0.0) (maxlen (length dx)))
(declare (type (double-float) dasum) (type fixnum maxlen))
@@ -2653,7 +2698,12 @@ gcc -o daxpyEx daxpyEX.f -lgfortran daxpy.o
\end{chunk}
\begin{chunk}{BLAS 1 daxpy}
+(declaim (ftype (function (fixnum double-float
+ (simple-array double-float (*)) fixnum
+ (simple-array double-float (*)) fixnum)
+ (simple-array double-float (*))) daxpy))
(defun daxpy (n da dx incx dy incy)
+ ; Tim Daly April 24, 2012
(declare (type (simple-array double-float) dx dy)
(type double-float da) (type fixnum incy incx n))
(let ((maxx (length dx)) (maxy (length dy)))
@@ -3137,7 +3187,11 @@ gcc -o dcopyEx dcopyEX.f -lgfortran dcopy.o
\end{chunk}
\begin{chunk}{BLAS 1 dcopy}
+(declaim (ftype (function (fixnum (simple-array double-float (*)) fixnum
+ (simple-array double-float (*)) fixnum)
+ (simple-array double-float (*))) dcopy))
(defun dcopy (n dx incx dy incy)
+ ; Tim Daly April 27, 2012
(declare (type (simple-array double-float) dy dx)
(type fixnum incy incx n))
(let ((maxx (length dx)) (maxy (length dy)))
@@ -3406,7 +3460,7 @@ gcc -o ddotEx ddotEX.f -lgfortran ddot.o
b = (/ 5.0D0, 6.0D0, 7.0D0, 8.0D0, 9.0D0 /)
write(6,100)a(1),a(2),a(3),a(4),a(5)
100 format("a=(/",f6.3," ",f6.3," ",f6.3," ",f6.3," ",f6.3,"/)")
- write(6,100)b(1),b(2),b(3),b(4),b(5)
+ write(6,101)b(1),b(2),b(3),b(4),b(5)
101 format("b=(/",f6.3," ",f6.3," ",f6.3," ",f6.3," ",f6.3,"/)")
* handle 0 elements
@@ -3453,6 +3507,7 @@ gcc -o ddotEx ddotEX.f -lgfortran ddot.o
(simple-array double-float (*)) fixnum)
double-float) ddot))
(defun ddot (n dx incx dy incy)
+ ; Tim Daly April 27, 2012
(declare (optimize (speed 3) (safety 0))
(type (simple-array double-float (*)) dx dy)
(type fixnum incy incx n))
@@ -3500,6 +3555,34 @@ gcc -o ddotEx ddotEX.f -lgfortran ddot.o
)set message auto off
)clear all
+--S 1 of 4
+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 1
+
+--S 2 of 4
+dnrm2(3,a,1)
+--R
+--R (2) 7.0710678118654755
+--R Type: DoubleFloat
+--E 2
+
+--S 3 of 4
+dnrm2(5,a,1)
+--R
+--R (3) 13.416407864998739
+--R Type: DoubleFloat
+--E 3
+
+--S 4 of 4
+dnrm2(3,a,2)
+--R
+--R (4) 10.72380529476361
+--R Type: DoubleFloat
+--E 4
+
)spool
)lisp (bye)
\end{chunk}
@@ -3508,6 +3591,25 @@ gcc -o ddotEx ddotEX.f -lgfortran ddot.o
dnrm2 examples
====================================================================
+DNRM2 is a BLAS level one which computes the Euclidean norm of a vector.
+
+Given the vector [ 3.0, -4.0, 5.0, -7.0, 9.0 ]
+
+dnrm2(3,a,1)
+ = sqrt(3.0^2 + -4.0^2 + 5.0^2)
+ = sqrt(50.0)
+ = 7.0710678118654755
+
+dnrm2(5,a,1)
+ = sqrt(3.0^2 + -4.0^2 + 5.0^2 + -7.0^2 + 9.0^2)
+ = sqrt(180.0)
+ = 13.416407864998739
+
+dnrm2(3,a,2)
+ = sqrt(3.0^2 + 5.0^2 + 9.0^2)
+ = sqrt(115.0)
+ = 10.72380529476361
+
====================================================================
Man Page Details
====================================================================
@@ -3620,49 +3722,89 @@ NOTES
\end{chunk}
-\begin{chunk}{BLAS 1 dnrm2}
-(let* ((one 1.0) (zero 0.0))
- (declare (type (double-float 1.0 1.0) one)
- (type (double-float 0.0 0.0) zero))
- (defun dnrm2 (n x incx)
- (declare (type (simple-array double-float (*)) x)
- (type fixnum incx n))
- (f2cl-lib:with-multi-array-data
- ((x double-float x-%data% x-%offset%))
- (prog ((absxi 0.0) (norm 0.0) (scale 0.0) (ssq 0.0) (ix 0) (dnrm2 0.0))
- (declare (type fixnum ix)
- (type (double-float) absxi norm scale ssq dnrm2))
- (cond
- ((or (< n 1) (< incx 1))
- (setf norm zero))
- ((= n 1)
- (setf norm (abs (f2cl-lib:fref x-%data% (1) ((1 *)) x-%offset%))))
- (t
- (setf scale zero)
- (setf ssq one)
- (f2cl-lib:fdo (ix 1 (f2cl-lib:int-add ix incx))
- ((> ix
- (f2cl-lib:int-add 1
- (f2cl-lib:int-mul
- (the fixnum (1- n)) incx)))
- nil)
- (tagbody
- (cond
- ((/= (f2cl-lib:fref x (ix) ((1 *))) zero)
- (setf absxi
- (abs
- (f2cl-lib:fref x-%data% (ix) ((1 *)) x-%offset%)))
- (cond
- ((< scale absxi)
- (setf ssq (+ one (* ssq (expt (/ scale absxi) 2))))
- (setf scale absxi))
- (t
- (setf ssq (+ ssq (expt (/ absxi scale) 2)))))))))
- (setf norm (* scale (f2cl-lib:fsqrt ssq)))))
- (setf dnrm2 norm)
- end_label
- (return (values dnrm2 nil nil nil))))))
+Compile with
+\begin{verbatim}
+gcc -c dnrm2.f
+gcc -o dnrm2Ex dnrm2EX.f -lgfortran dnrm2.o
+\end{verbatim}
+
+\begin{chunk}{dnrm2 example}
+ program dnrm2EX
+* Tim Daly April 28, 2012
+* unit tests for BLAS dnrm2
+ double precision a(5)
+ double precision c
+ a = (/ 3.0D0, -4.0D0, 5.0D0, -7.0D0, 9.0D0/)
+ write(6,100)a(1),a(2),a(3)
+ 100 format("a=(/",f6.3," ",f6.3," ",f6.3"/)")
+
+ c=dnrm2(3,a,1)
+ write(6,200)c
+ 200 format(/,"t200 is sqrt(50.0)=7.071",/,"c=",f6.3)
+
+ c=dnrm2(5,a,1)
+ write(6,201)c
+ 201 format(/,"t201 is sqrt(180.0)=13.416",/,"c=",f6.3)
+ c=dnrm2(3,a,2)
+ write(6,202)c
+ 202 format(/,"t202 is sqrt(115.0)=10.724",/,"c=",f9.3)
+
+ stop
+ end
+\end{chunk}
+
+\begin{chunk}{BLAS 1 dnrm2}
+(declaim (ftype (function (fixnum (simple-array double-float (*)) fixnum)
+ double-float) dnrm2))
+(defun dnrm2 (n x incx)
+ ; Tim Daly April 28, 2012
+ (declare (type (simple-array double-float (*)) x) (type fixnum incx n))
+ (let ((absxi 0.0d0) (norm 0.0d0) (scale 0.0d0) (ssq 0.0d0)
+ (limit 0) (t1 0.0D0))
+ (declare (type fixnum limit) (type double-float absxi norm scale ssq t1))
+ (cond
+ ((or (< n 1) (< incx 1)) (setf norm 0.0d0))
+ ((= n 1) (setf norm (abs (aref x 0))))
+ (t
+ (setf limit (min (* (- n 1) incx) (1- (length x))))
+ (do ((ix 0 (+ ix incx)))
+ ((> ix limit) nil)
+ (unless (= 0.0d0 (the double-float (aref x ix)))
+ (setf absxi (the double-float (abs (the double-float (aref x ix)))))
+ (cond
+ ((< scale absxi)
+ (setf t1 (the double-float
+ (/ (the double-float scale) (the double-float absxi))))
+ (setf ssq
+ (the double-float
+ (+ 1.0d0
+ (the double-float
+ (* (the double-float ssq)
+ (the double-float
+ (* (the double-float t1) (the double-float t1))))))))
+ (setf scale absxi))
+ (t
+ (setf t1 (the double-float
+ (/ (the double-float absxi) (the double-float scale))))
+ (setf ssq
+ (the double-float
+ (+ (the double-float ssq)
+ (the double-float
+ (* (the double-float t1) (the double-float t1))))))))))
+ (setf norm (the double-float (* scale (the double-float (sqrt ssq)))))))
+ norm))
+
+\end{chunk}
+
+\begin{chunk}{BLAS 1 dnrm2 lisp test}
+(setq a (vector 3.0D0 -4.0D0 5.0D0 -7.0D0 9.0D0))
+; sqrt(50.0) = 7.0710678118654755
+(dnrm2 3 a 1)
+; sqrt(180.0) = 13.416407864998739
+(dnrm2 5 a 1)
+; sqrt(115.0) = 10.72380529476361
+(dnrm2 3 a 2)
\end{chunk}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{drotg BLAS}
@@ -136628,12 +136770,12 @@ Warning: Types of argument 1 in call to ZLARFB do not match.
\getchunk{BLAS 1 daxpy}
\getchunk{BLAS 1 dcopy}
\getchunk{BLAS 1 ddot}
+\getchunk{BLAS 1 dnrm2}
\end{chunk}
\begin{chunk}{untested}
\getchunk{BLAS lsame}
\getchunk{BLAS xerbla}
-\getchunk{BLAS 1 dnrm2}
\getchunk{BLAS 1 drotg}
\getchunk{BLAS 1 drot}
\getchunk{BLAS 1 dscal}
diff --git a/changelog b/changelog
index 6082cc8..94a7379 100644
--- a/changelog
+++ b/changelog
@@ -1,3 +1,5 @@
+20120429 tpd src/axiom-website/patches.html 20120429.01.tpd.patch
+20120429 tpd books/bookvol10.5 BLAS1 dnrm2
20120428 tpd src/axiom-website/patches.html 20120428.01.tpd.patch
20120428 tpd books/bookvolbib fix typo
20120428 tpd books/bookvol10.5 BLAS1 ddot
diff --git a/src/axiom-website/patches.html b/src/axiom-website/patches.html
index ce8178b..ef8a85c 100644
--- a/src/axiom-website/patches.html
+++ b/src/axiom-website/patches.html
@@ -3894,5 +3894,7 @@ books/bookvol10.5 BLAS1 daxpy test cases
books/bookvol10.5 BLAS1 dcopy test cases
20120428.01.tpd.patch
books/bookvol10.5 BLAS1 ddot
+20120429.01.tpd.patch
+books/bookvol10.5 BLAS1 dnrm2