276 |
(,op x y))) |
(,op x y))) |
277 |
(fn (compile nil source))) |
(fn (compile nil source))) |
278 |
(loop for i below niters |
(loop for i below niters |
279 |
for x = (random-from-interval xhi xlo) |
for x = (random-from-interval (1+ xhi) xlo) |
280 |
for y = (random-from-interval yhi ylo) |
for y = (random-from-interval (1+ yhi) ylo) |
281 |
unless (eql (funcall (the symbol op) x y) |
unless (eql (funcall (the symbol op) x y) |
282 |
(funcall fn x y)) |
(funcall fn x y)) |
283 |
collect (list x y)))) |
collect (list x y)))) |
284 |
|
|
285 |
|
(defun test-log-op (op n1 n2) |
286 |
|
(flet ((%r () (let ((r (random 33))) |
287 |
|
(- (random (ash 1 (1+ r))) (ash 1 r))))) |
288 |
|
(loop for x1 = (%r) |
289 |
|
for x2 = (%r) |
290 |
|
for y1 = (%r) |
291 |
|
for y2 = (%r) |
292 |
|
repeat n1 |
293 |
|
nconc |
294 |
|
(test-log-op-with-decls op |
295 |
|
(min x1 x2) (max x1 x2) |
296 |
|
(min y1 y2) (max y1 y2) |
297 |
|
n2)))) |