@@ -40,56 +40,56 @@ tape( 'the function has an arity of 7', function test( t ) {
40
40
t . end ( ) ;
41
41
} ) ;
42
42
43
- tape ( 'the function calculates the dot product of two double-precision complex floating-point vectors `zx ` and `zy `' , function test ( t ) {
43
+ tape ( 'the function calculates the dot product of two double-precision complex floating-point vectors `x ` and `y `' , function test ( t ) {
44
44
var dot ;
45
- var zx ;
46
- var zy ;
45
+ var x ;
46
+ var y ;
47
47
48
- zx = new Complex128Array ( [ 4.0 , 2.0 , - 3.0 , 5.0 , - 1.0 , 2.0 , - 5.0 , 6.0 ] ) ;
49
- zy = new Complex128Array ( [ 2.0 , 6.0 , - 1.0 , - 4.0 , 8.0 , 8.0 , 2.0 , - 3.0 ] ) ;
48
+ x = new Complex128Array ( [ 4.0 , 2.0 , - 3.0 , 5.0 , - 1.0 , 2.0 , - 5.0 , 6.0 ] ) ;
49
+ y = new Complex128Array ( [ 2.0 , 6.0 , - 1.0 , - 4.0 , 8.0 , 8.0 , 2.0 , - 3.0 ] ) ;
50
50
51
- dot = zdotu ( zx . length , zx , 1 , 0 , zy , 1 , 0 ) ;
51
+ dot = zdotu ( x . length , x , 1 , 0 , y , 1 , 0 ) ;
52
52
t . strictEqual ( isSameComplex128 ( dot , new Complex128 ( 3 , 70 ) ) , true , 'returns expected value' ) ;
53
53
54
- zx = new Complex128Array ( [ 3.0 , - 4.0 , 1.0 , 2.0 ] ) ;
55
- zy = new Complex128Array ( [ 1.0 , - 2.0 , 3.0 , 8.0 ] ) ;
54
+ x = new Complex128Array ( [ 3.0 , - 4.0 , 1.0 , 2.0 ] ) ;
55
+ y = new Complex128Array ( [ 1.0 , - 2.0 , 3.0 , 8.0 ] ) ;
56
56
57
- dot = zdotu ( zx . length , zx , 1 , 0 , zy , 1 , 0 ) ;
57
+ dot = zdotu ( x . length , x , 1 , 0 , y , 1 , 0 ) ;
58
58
t . strictEqual ( isSameComplex128 ( dot , new Complex128 ( - 18 , 4 ) ) , true , 'returns expected value' ) ;
59
59
60
60
t . end ( ) ;
61
61
} ) ;
62
62
63
63
tape ( 'if provided an `N` parameter less than or equal to `0`, the function returns `0`' , function test ( t ) {
64
64
var dot ;
65
- var zx ;
66
- var zy ;
65
+ var x ;
66
+ var y ;
67
67
68
- zx = new Complex128Array ( [ 3.0 , - 4.0 , 1.0 , 7.0 ] ) ;
69
- zy = new Complex128Array ( [ 1.0 , - 2.0 , 3.0 , - 3.0 ] ) ;
68
+ x = new Complex128Array ( [ 3.0 , - 4.0 , 1.0 , 7.0 ] ) ;
69
+ y = new Complex128Array ( [ 1.0 , - 2.0 , 3.0 , - 3.0 ] ) ;
70
70
71
- dot = zdotu ( 0 , zx , 1 , 0 , zy , 1 , 0 ) ;
71
+ dot = zdotu ( 0 , x , 1 , 0 , y , 1 , 0 ) ;
72
72
t . strictEqual ( isSameComplex128 ( dot , new Complex128 ( 0 , 0 ) ) , true , 'returns expected value' ) ;
73
73
74
- dot = zdotu ( - 4 , zx , 1 , 0 , zy , 1 , 0 ) ;
74
+ dot = zdotu ( - 4 , x , 1 , 0 , y , 1 , 0 ) ;
75
75
t . strictEqual ( isSameComplex128 ( dot , new Complex128 ( 0 , 0 ) ) , true , 'returns expected value' ) ;
76
76
t . end ( ) ;
77
77
} ) ;
78
78
79
- tape ( 'the function supports an `zx ` stride' , function test ( t ) {
79
+ tape ( 'the function supports an `x ` stride' , function test ( t ) {
80
80
var dot ;
81
- var zx ;
82
- var zy ;
81
+ var x ;
82
+ var y ;
83
83
84
- zx = new Complex128Array ( [
84
+ x = new Complex128Array ( [
85
85
2.0 , // 0
86
86
- 3.0 , // 0
87
87
- 5.0 ,
88
88
6.0 ,
89
89
7.0 , // 1
90
90
6.0 // 1
91
91
] ) ;
92
- zy = new Complex128Array ( [
92
+ y = new Complex128Array ( [
93
93
8.0 , // 0
94
94
2.0 , // 0
95
95
- 3.0 , // 1
@@ -98,25 +98,25 @@ tape( 'the function supports an `zx` stride', function test( t ) {
98
98
1.0
99
99
] ) ;
100
100
101
- dot = zdotu ( 2 , zx , 2 , 0 , zy , 1 , 0 ) ;
101
+ dot = zdotu ( 2 , x , 2 , 0 , y , 1 , 0 ) ;
102
102
t . strictEqual ( isSameComplex128 ( dot , new Complex128 ( - 17 , - 17 ) ) , true , 'returns expected value' ) ;
103
103
t . end ( ) ;
104
104
} ) ;
105
105
106
- tape ( 'the function supports an `zx ` offset' , function test ( t ) {
106
+ tape ( 'the function supports an `x ` offset' , function test ( t ) {
107
107
var dot ;
108
- var zx ;
109
- var zy ;
108
+ var x ;
109
+ var y ;
110
110
111
- zx = new Complex128Array ( [
111
+ x = new Complex128Array ( [
112
112
2.0 ,
113
113
- 3.0 ,
114
114
- 5.0 , // 0
115
115
6.0 , // 0
116
116
7.0 , // 1
117
117
6.0 // 1
118
118
] ) ;
119
- zy = new Complex128Array ( [
119
+ y = new Complex128Array ( [
120
120
8.0 , // 0
121
121
2.0 , // 0
122
122
- 3.0 , // 1
@@ -125,25 +125,25 @@ tape( 'the function supports an `zx` offset', function test( t ) {
125
125
1.0
126
126
] ) ;
127
127
128
- dot = zdotu ( 2 , zx , 1 , 1 , zy , 1 , 0 ) ;
128
+ dot = zdotu ( 2 , x , 1 , 1 , y , 1 , 0 ) ;
129
129
t . strictEqual ( isSameComplex128 ( dot , new Complex128 ( - 91 , 41 ) ) , true , 'returns expected value' ) ;
130
130
t . end ( ) ;
131
131
} ) ;
132
132
133
- tape ( 'the function supports a `zy ` stride' , function test ( t ) {
133
+ tape ( 'the function supports a `y ` stride' , function test ( t ) {
134
134
var dot ;
135
- var zx ;
136
- var zy ;
135
+ var x ;
136
+ var y ;
137
137
138
- zx = new Complex128Array ( [
138
+ x = new Complex128Array ( [
139
139
2.0 , // 0
140
140
- 3.0 , // 0
141
141
- 5.0 , // 1
142
142
6.0 , // 1
143
143
7.0 ,
144
144
6.0
145
145
] ) ;
146
- zy = new Complex128Array ( [
146
+ y = new Complex128Array ( [
147
147
8.0 , // 0
148
148
2.0 , // 0
149
149
- 3.0 ,
@@ -152,25 +152,25 @@ tape( 'the function supports a `zy` stride', function test( t ) {
152
152
1.0 // 1
153
153
] ) ;
154
154
155
- dot = zdotu ( 2 , zx , 1 , 0 , zy , 2 , 0 ) ;
155
+ dot = zdotu ( 2 , x , 1 , 0 , y , 2 , 0 ) ;
156
156
t . strictEqual ( isSameComplex128 ( dot , new Complex128 ( 36 , - 49 ) ) , true , 'returns expected value' ) ;
157
157
t . end ( ) ;
158
158
} ) ;
159
159
160
- tape ( 'the function supports a `zy ` offset' , function test ( t ) {
160
+ tape ( 'the function supports a `y ` offset' , function test ( t ) {
161
161
var dot ;
162
- var zx ;
163
- var zy ;
162
+ var x ;
163
+ var y ;
164
164
165
- zx = new Complex128Array ( [
165
+ x = new Complex128Array ( [
166
166
1.0 , // 0
167
167
2.0 , // 0
168
168
3.0 ,
169
169
4.0 ,
170
170
5.0 , // 1
171
171
6.0 // 1
172
172
] ) ;
173
- zy = new Complex128Array ( [
173
+ y = new Complex128Array ( [
174
174
7.0 ,
175
175
8.0 ,
176
176
9.0 , // 0
@@ -179,25 +179,25 @@ tape( 'the function supports a `zy` offset', function test( t ) {
179
179
12.0 // 1
180
180
] ) ;
181
181
182
- dot = zdotu ( 2 , zx , 2 , 0 , zy , 1 , 1 ) ;
182
+ dot = zdotu ( 2 , x , 2 , 0 , y , 1 , 1 ) ;
183
183
t . strictEqual ( isSameComplex128 ( dot , new Complex128 ( - 28 , 154 ) ) , true , 'returns expected value' ) ;
184
184
t . end ( ) ;
185
185
} ) ;
186
186
187
187
tape ( 'the function supports negative strides' , function test ( t ) {
188
188
var dot ;
189
- var zx ;
190
- var zy ;
189
+ var x ;
190
+ var y ;
191
191
192
- zx = new Complex128Array ( [
192
+ x = new Complex128Array ( [
193
193
1.0 , // 1
194
194
2.0 , // 1
195
195
3.0 ,
196
196
4.0 ,
197
197
5.0 , // 0
198
198
6.0 // 0
199
199
] ) ;
200
- zy = new Complex128Array ( [
200
+ y = new Complex128Array ( [
201
201
7.0 ,
202
202
8.0 ,
203
203
9.0 , // 1
@@ -206,25 +206,25 @@ tape( 'the function supports negative strides', function test( t ) {
206
206
12.0 // 0
207
207
] ) ;
208
208
209
- dot = zdotu ( 2 , zx , - 2 , zx . length - 1 , zy , - 1 , 2 ) ;
209
+ dot = zdotu ( 2 , x , - 2 , x . length - 1 , y , - 1 , 2 ) ;
210
210
t . strictEqual ( isSameComplex128 ( dot , new Complex128 ( - 28 , 154 ) ) , true , 'returns expected value' ) ;
211
211
t . end ( ) ;
212
212
} ) ;
213
213
214
214
tape ( 'the function supports complex access patterns' , function test ( t ) {
215
215
var dot ;
216
- var zx ;
217
- var zy ;
216
+ var x ;
217
+ var y ;
218
218
219
- zx = new Complex128Array ( [
219
+ x = new Complex128Array ( [
220
220
1.0 , // 0
221
221
2.0 , // 0
222
222
3.0 ,
223
223
4.0 ,
224
224
5.0 , // 1
225
225
6.0 // 1
226
226
] ) ;
227
- zy = new Complex128Array ( [
227
+ y = new Complex128Array ( [
228
228
7.0 , // 0
229
229
8.0 , // 0
230
230
9.0 , // 1
@@ -233,7 +233,7 @@ tape( 'the function supports complex access patterns', function test( t ) {
233
233
12.0
234
234
] ) ;
235
235
236
- dot = zdotu ( 2 , zx , 2 , 0 , zy , - 1 , zy . length - 2 ) ;
236
+ dot = zdotu ( 2 , x , 2 , 0 , y , - 1 , y . length - 2 ) ;
237
237
t . strictEqual ( isSameComplex128 ( dot , new Complex128 ( - 24 , 110 ) ) , true , 'returns expected value' ) ;
238
238
t . end ( ) ;
239
239
} ) ;
0 commit comments