247
252
@check_bit_operation (/) Matrix{Float64} (b1, b1)
248
253
@check_bit_operation (\) Matrix{Float64} (b1, b1)
250
b1 = randbool(n1, n2)
251
b2 = rand(1:10, n1, n2)
256
@check_bit_operation (&) BitVector (b0, b0)
257
@check_bit_operation (|) BitVector (b0, b0)
258
@check_bit_operation ($) BitVector (b0, b0)
259
@check_bit_operation (.*) BitVector (b0, b0)
260
@check_bit_operation (*) BitMatrix (b0, b0')
262
# Matrix{Bool}/Matrix{Int}
263
b1 = randbool(n1, n2)
264
i2 = rand(1:10, n1, n2)
265
@check_bit_operation (&) Matrix{Int} (b1, i2)
266
@check_bit_operation (|) Matrix{Int} (b1, i2)
267
@check_bit_operation ($) Matrix{Int} (b1, i2)
268
@check_bit_operation (+) Matrix{Int} (b1, i2)
269
@check_bit_operation (-) Matrix{Int} (b1, i2)
270
@check_bit_operation (.*) Matrix{Int} (b1, i2)
271
@check_bit_operation (./) Matrix{Float64} (b1, i2)
272
@check_bit_operation (.^) BitMatrix (b1, i2)
273
@check_bit_operation div Matrix{Int} (b1, i2)
274
@check_bit_operation mod Matrix{Int} (b1, i2)
276
# Matrix{Bool}/Matrix{Float64}
277
b1 = randbool(n1, n2)
278
f2 = 1.0 + rand(n1, n2)
279
@check_bit_operation (.*) Matrix{Float64} (b1, f2)
280
@check_bit_operation (./) Matrix{Float64} (b1, f2)
281
@check_bit_operation (.^) Matrix{Float64} (b1, f2)
282
@check_bit_operation div Matrix{Float64} (b1, f2)
283
@check_bit_operation mod Matrix{Float64} (b1, f2)
286
b2 = randbool(n1, n2)
288
@check_bit_operation (&) Matrix{Int} (i1, b2)
289
@check_bit_operation (|) Matrix{Int} (i1, b2)
290
@check_bit_operation ($) Matrix{Int} (i1, b2)
291
@check_bit_operation (+) Matrix{Int} (i1, b2)
292
@check_bit_operation (-) Matrix{Int} (i1, b2)
293
@check_bit_operation (.*) Matrix{Int} (i1, b2)
294
u1 = uint8(rand(1:10))
295
@check_bit_operation (&) Matrix{Uint8} (u1, b2)
296
@check_bit_operation (|) Matrix{Uint8} (u1, b2)
297
@check_bit_operation ($) Matrix{Uint8} (u1, b2)
298
@check_bit_operation (+) Matrix{Uint} (u1, b2)
299
@check_bit_operation (-) Matrix{Uint} (u1, b2)
300
@check_bit_operation (.*) Matrix{Uint8} (u1, b2)
307
for (x1,t1,t2) = {(f1, Float64, Float64),
308
(ci1, ComplexPair{Int}, ComplexPair{Int}),
309
(cu1, ComplexPair{Uint}, ComplexPair{Uint8}),
310
(cf1, Complex128, Complex128)}
311
@check_bit_operation (+) Matrix{t1} (x1, b2)
312
@check_bit_operation (-) Matrix{t1} (x1, b2)
313
@check_bit_operation (.*) Matrix{t2} (x1, b2)
317
@check_bit_operation (./) Matrix{Float64} (i1, b2)
318
@check_bit_operation div Matrix{Int} (i1, b2)
319
@check_bit_operation mod Matrix{Int} (i1, b2)
321
@check_bit_operation (./) Matrix{Float64} (f1, b2)
322
@check_bit_operation div Matrix{Float64} (f1, b2)
323
@check_bit_operation mod Matrix{Float64} (f1, b2)
325
for x1 = {ci1, cu1, cf1}
326
@check_bit_operation (./) Matrix{Complex128} (x1, b2)
329
@check_bit_operation (.^) BitMatrix (false, b1)
330
@check_bit_operation (.^) BitMatrix (true, b1)
331
@check_bit_operation (.^) Matrix{Uint8} (0x0, b1)
332
@check_bit_operation (.^) Matrix{Uint8} (0x1, b1)
333
@check_bit_operation (.^) Matrix{Int} (-1, b1)
334
@check_bit_operation (.^) Matrix{Int} (0, b1)
335
@check_bit_operation (.^) Matrix{Int} (1, b1)
336
@check_bit_operation (.^) Matrix{Float64} (0.0, b1)
337
@check_bit_operation (.^) Matrix{Float64} (1.0, b1)
338
@check_bit_operation (.^) Matrix{Complex128} (0.0im, b1)
339
@check_bit_operation (.^) Matrix{Complex128} (1.0im, b1)
340
@check_bit_operation (.^) Matrix{ComplexPair{Int}} (0im, b1)
341
@check_bit_operation (.^) Matrix{ComplexPair{Int}} (1im, b1)
344
b1 = randbool(n1, n2)
252
346
@check_bit_operation (&) Matrix{Int} (b1, b2)
253
347
@check_bit_operation (|) Matrix{Int} (b1, b2)
254
348
@check_bit_operation ($) Matrix{Int} (b1, b2)
255
349
@check_bit_operation (-) Matrix{Int} (b1, b2)
256
350
@check_bit_operation (.*) Matrix{Int} (b1, b2)
257
351
@check_bit_operation (./) Matrix{Float64} (b1, b2)
258
@check_bit_operation (.^) Matrix{Float64} (b1, b2)
259
352
@check_bit_operation div Matrix{Int} (b1, b2)
260
353
@check_bit_operation mod Matrix{Int} (b1, b2)
262
b1 = randbool(n1, n2)
263
b2 = randbool(n1, n2)
264
@check_bit_operation (&) BitMatrix (b1, b2)
265
@check_bit_operation (|) BitMatrix (b1, b2)
266
@check_bit_operation ($) BitMatrix (b1, b2)
267
@check_bit_operation (.*) BitMatrix (b1, b2)
268
@check_bit_operation (*) BitMatrix (b1, b1')
355
@check_bit_operation (.^) BitMatrix (b1, false)
356
@check_bit_operation (.^) BitMatrix (b1, true)
357
@check_bit_operation (.^) BitMatrix (b1, 0x0)
358
@check_bit_operation (.^) BitMatrix (b1, 0x1)
359
@check_bit_operation (.^) BitMatrix (b1, 0)
360
@check_bit_operation (.^) BitMatrix (b1, 1)
361
@check_bit_operation (.^) Matrix{Float64} (b1, -1.0)
362
@check_bit_operation (.^) Matrix{Float64} (b1, 0.0)
363
@check_bit_operation (.^) Matrix{Float64} (b1, 1.0)
364
@check_bit_operation (.^) Matrix{Complex128} (b1, 0.0im)
365
@check_bit_operation (.^) Matrix{ComplexPair{Int}} (b1, 0im)
271
@check_bit_operation (&) BitVector (b0, b0)
272
@check_bit_operation (|) BitVector (b0, b0)
273
@check_bit_operation ($) BitVector (b0, b0)
274
@check_bit_operation (.*) BitVector (b0, b0)
275
@check_bit_operation (*) BitMatrix (b0, b0')
368
@check_bit_operation (.^) Matrix{Complex128} (b1, -1.0im)
369
@check_bit_operation (.^) Matrix{Complex128} (b1, 1.0im)
370
@check_bit_operation (.^) Matrix{Complex128} (b1, -1im)
371
@check_bit_operation (.^) Matrix{Complex128} (b1, 1im)
277
373
timesofar("binary arithmetic")