Ticket #1059: test-cl-float.lisp

File test-cl-float.lisp, 23.4 KB (added by dfindlay, 18 months ago)

Updated test script

Line 
1;;; CL function test
2
3(in-package :cl-user)
4
5(defun point= (p1 p2)
6  (flet ((1= (x y)
7           (or (eql x y)
8               (eql y '*))))
9    (and (1= (first p1) (first p2))
10         (1= (second p1) (second p2)))))
11
12(defun validate-range (fn-name type point x-range &optional except (y-range x-range))
13  (let ((n-errors 0))
14    (flet ((report (reason x y)
15             (when (< (incf n-errors) 10)
16               (format t
17                       "~&; ~A (~A (~A ~A ~A))~%"
18                       reason
19                       fn-name
20                       type
21                       x
22                       y))))
23      (do ((end-y (second y-range))
24           (step-y (or (third y-range) 1))
25           (y (first y-range) (+ y step-y)))
26          ((> y end-y))
27        (do ((y1 (funcall point y))
28             (end-x (second x-range))
29             (step-x (or (third x-range) 1))
30             (x (first x-range) (+ x step-x)))
31            ((> x end-x))
32          (let ((x1 (funcall point x)))
33            (when (and x1 y1)
34              (let ((bad (find (list x1 y1) except :test #'point=)))
35                (handler-case
36                    (progn
37                      (multiple-value-call fn-name (funcall type x1 y1))
38                      (when bad
39                        (report "No error at" x1 y1)))
40                  (error ()
41                    (unless bad
42                      (report "Failed" x1 y1))))))))))
43    (format t
44            "~&; (~A (~A ~A) ~A ~A) - ~D total error~:P~%"
45            fn-name
46            type
47            point
48            x-range
49            y-range
50            n-errors)
51    n-errors))
52
53(defun power (x)
54  (if (zerop x)
55    x
56    (let ((power (ash 1 (1- (abs x)))))
57      (if (minusp x) (- power) power))))
58
59(defun real-power (x)
60  (float (power x) 1.0))
61
62(defun dble-power (x)
63  (float (power x) 1.0d0))
64
65(defun inv-power (x)
66  (let ((z (power x)))
67    (unless (zerop z) (/ z))))
68
69(defun inv-real-power (x)
70  (let ((z (real-power x)))
71    (unless (zerop z) (/ z))))
72
73(defun inv-dble-power (x)
74  (let ((z (dble-power x)))
75    (unless (zerop z) (/ z))))
76
77(defun dble-float (x)
78  (float x 1.0d0))
79
80
81(defun validate-spot (fn-name type x y &optional except)
82  (let ((n-errors 0))
83    (flet ((report (reason x y)
84             (incf n-errors)
85             (format t
86                     "~&; ~A (~A (~A ~A ~A))~%"
87                     reason
88                     fn-name
89                     type
90                     x
91                     y)))
92      (dolist (pair (list (cons x y)
93                          (cons x 0)
94                          (cons x (- y))
95                          (cons 0 (- y))
96                          (cons (- x) (- y))
97                          (cons (- x) 0)
98                          (cons (- x) y)
99                          (cons 0 y)
100                          (cons y x)
101                          (cons y 0)
102                          (cons y (- x))
103                          (cons 0 (- x))
104                          (cons (- y) (- x))
105                          (cons (- y) 0)
106                          (cons (- y) x)
107                          (cons 0 x))
108                    n-errors)
109        (let* ((x1 (car pair))
110               (y1 (cdr pair))
111               (bad (find (list x1 y1) except :test #'point=)))
112          (handler-case
113              (progn
114                (multiple-value-call fn-name (funcall type x1 y1))
115                (when bad
116                  (report "No error at" x1 y1)))
117            (error ()
118              (unless bad
119                (report "Failed" x1 y1)))))))))
120
121(defun validate-value (fn-name type x y value)
122  (cond ((eql (multiple-value-call fn-name (funcall type x y)) value)
123         0)
124        (t
125         (format t
126                 "~&; (~A (~A ~A ~A)) /= ~A~%"
127                 fn-name
128                 type
129                 x
130                 y
131                 value)
132         1)))
133
134;;; N.B. This assumes that 0.0 and -0.0 are in fact different!
135(defun validate-branch-cut (fn-name type cut point v-range &optional end (o '(-0.0 0.0)))
136  (let ((n-errors 0))
137    (flet ((report (reason z1 z2)
138             (when (< (incf n-errors) 10)
139               (format t
140                       "~&; ~A (~A ~A|~A)~%"
141                       reason
142                       fn-name
143                       z1
144                       z2)))
145           (c (x y)
146             (if (eq type :x)
147               (if (eql y 0)
148                 x
149                 (complex x y))
150               (complex y x))))
151      (do ((end-v (second v-range))
152           (step-v (or (third v-range) 1))
153           (v (first v-range) (+ v step-v)))
154          ((> v end-v) n-errors)
155        (let* ((x (funcall point v))
156               (z1 (c x (first o)))
157               (z2 (c x (second o))))
158          (handler-case
159              (let ((v1 (funcall fn-name z1))
160                    (v2 (funcall fn-name z2)))
161                (when (if cut
162                        (and (= v1 v2)
163                             (if (find v end)
164                               (and (if (zerop (realpart v1)) (eql (realpart v1) (realpart v2)) t)
165                                    (if (zerop (imagpart v1)) (eql (imagpart v1) (imagpart v2)) t))
166                               t))
167                        (/= v1 v2))
168                  (report (if cut "No branch cut at" "Discontinuous at") z1 z2)))
169            (error ()
170              (report "Failed" z1 z2))))))))
171
172(defun validate-pole (fn-name z point v-range)
173  (let ((n-errors 0))
174    (labels ((epsilon (x)
175               (typecase x
176                 (single-float
177                  (if (zerop x)
178                    least-positive-single-float
179                    (* x single-float-epsilon)))
180                 (double-float
181                  (if (zerop x)
182                    least-positive-double-float
183                    (* x double-float-epsilon)))
184                 (t
185                  (expt 2 -127))))
186             (add1 (x o)
187               (cond ((numberp o)
188                      (+ x o))
189                     ((zerop x)
190                      (if (rationalp x)
191                        0
192                        (float (if (eq o '+) 0.0 -0.0) x)))
193                     (t
194                      x)))
195             (add (c o)
196               (complex (add1 (realpart c) (car o))
197                        (add1 (imagpart c) (cdr o)))))
198      (do ((dx (epsilon (realpart z)))
199           (dy (epsilon (imagpart z)))
200           (end-v (second v-range))
201           (step-v (or (third v-range) 1))
202           (v (first v-range) (+ v step-v)))
203          ((> v end-v) n-errors)
204        (let* ((delta (funcall point v))
205               (delta-x (* delta dx))
206               (delta-y (* delta dy)))
207          (dolist (pair (list (cons delta-x delta-y)
208                              (cons delta-x '+)
209                              (cons delta-x '-)
210                              (cons delta-x (- delta-y))
211                              (cons '+ (- delta-y))
212                              (cons '- (- delta-y))
213                              (cons (- delta-x) (- delta-y))
214                              (cons (- delta-x) '+)
215                              (cons (- delta-x) '-)
216                              (cons (- delta-x) delta-y)
217                              (cons '+ delta-y)
218                              (cons '- delta-y)))
219            (let ((z1 (add z pair)))
220              (handler-case
221                  (funcall fn-name z1)
222                (error ()
223                  (when (< (incf n-errors) 10)
224                    (format t
225                            "~&; Failed (~A ~A)~%"
226                            fn-name
227                            z1)))))))))))
228
229(defun summarise (&rest results)
230  (let ((n-errors (apply #'+ results)))
231    (format t "~&; TOTAL: ~D error~:P~%" n-errors)
232    n-errors))
233
234
235;;;
236(summarise
237
238(validate-range 'sqrt 'complex 'power '(-256 256 2))
239(validate-range 'sqrt 'complex 'inv-power '(-256 256 2))
240(validate-range 'sqrt 'complex 'real-power '(-128 128))
241(validate-range 'sqrt 'complex 'inv-real-power '(-128 128))
242(validate-range 'sqrt 'complex 'dble-power '(-1024 1024 8))
243(validate-range 'sqrt 'complex 'inv-dble-power '(-1024 1024 8))
244
245(validate-range 'abs 'complex 'power '(-128 128))
246(validate-range 'abs 'complex 'inv-power '(-128 128))
247(validate-range 'abs 'complex 'real-power '(-128 128))
248(validate-range 'abs 'complex 'inv-real-power '(-128 128))
249(validate-range 'abs 'complex 'dble-power '(-1024 1024 8))
250(validate-range 'abs 'complex 'inv-dble-power '(-1024 1024 8))
251
252(validate-range 'phase 'complex 'power '(-2048 2048 32))
253(validate-range 'phase 'complex 'inv-power '(-2048 2048 32))
254(validate-range 'phase 'complex 'real-power '(-128 128))
255(validate-range 'phase 'complex 'inv-real-power '(-128 128))
256(validate-range 'phase 'complex 'dble-power '(-1024 1024 8))
257(validate-range 'phase 'complex 'inv-dble-power '(-1024 1024 8))
258
259(validate-range 'log 'complex 'power '(-128 128) '((0 0)))
260(validate-range 'log 'complex 'inv-power '(-128 128))
261(validate-range 'log 'complex 'real-power '(-128 128) '((0.0 0.0)))
262(validate-range 'log 'complex 'inv-real-power '(-128 128))
263(validate-range 'log 'complex 'dble-power '(-1020 1020 8))
264(validate-range 'log 'complex 'inv-dble-power '(-1020 1020 8))
265(validate-range 'log 'complex 'power '(-2040 2040 32))
266(validate-range 'log 'complex 'inv-power '(-2040 2040 32))
267
268(validate-range 'exp 'complex 'power '(-2048 -32 32) nil '(-2048 2048 32))
269(validate-range 'exp 'complex 'power '(-31 7) nil '(-2048 2048 32))
270(validate-range 'exp 'complex 'inv-power '(-2048 2048 32))
271(validate-range 'exp 'complex 'real-power '(-128 7) nil '(-128 128))
272(validate-range 'exp 'complex 'inv-real-power '(-128 128))
273(validate-range 'exp 'complex 'dble-power '(-1024 0 8) nil '(-1024 1024 8))
274(validate-range 'exp 'complex 'dble-power '(1 10) nil '(-1024 1024 8))
275(validate-range 'exp 'complex 'inv-dble-power '(-1024 1024 8))
276
277(validate-range 'sin 'complex 'power '(-2048 2048 32) nil '(-7 7))
278(validate-range 'sin 'complex 'inv-power '(-2048 2048 32))
279(validate-range 'sin 'complex 'real-power '(-128 128) nil '(-7 7))
280(validate-range 'sin 'complex 'inv-real-power '(-128 128))
281(validate-range 'sin 'complex 'dble-power '(-1024 1024 8) nil '(-10 10))
282(validate-range 'sin 'complex 'inv-dble-power '(-1024 1024 8))
283
284(validate-range 'cos 'complex 'power '(-2048 2048 32) nil '(-7 7))
285(validate-range 'cos 'complex 'inv-power '(-2048 2048 32))
286(validate-range 'cos 'complex 'real-power '(-128 128) nil '(-7 7))
287(validate-range 'cos 'complex 'inv-real-power '(-128 128))
288(validate-range 'cos 'complex 'dble-power '(-1024 1024 8) nil '(-10 10))
289(validate-range 'cos 'complex 'inv-dble-power '(-1024 1024 8))
290
291(validate-range 'tan 'complex 'power '(-2048 2048 32))
292(validate-range 'tan 'complex 'inv-power '(-2048 2048 32))
293(validate-range 'tan 'complex 'real-power '(-128 128))
294(validate-range 'tan 'complex 'inv-real-power '(-128 128))
295(validate-range 'tan 'complex 'dble-power '(-1024 1024 8))
296(validate-range 'tan 'complex 'inv-dble-power '(-1024 1024 8))
297
298(validate-range 'asin 'complex 'power '(-2048 2048 32))
299(validate-range 'asin 'complex 'inv-power '(-2048 2048 32))
300(validate-range 'asin 'complex 'real-power '(-128 128))
301(validate-range 'asin 'complex 'inv-real-power '(-128 128))
302(validate-range 'asin 'complex 'dble-power '(-1024 1024 8))
303(validate-range 'asin 'complex 'inv-dble-power '(-1024 1024 8))
304
305(validate-range 'acos 'complex 'power '(-2048 2048 32))
306(validate-range 'acos 'complex 'inv-power '(-2048 2048 32))
307(validate-range 'acos 'complex 'real-power '(-128 128))
308(validate-range 'acos 'complex 'inv-real-power '(-128 128))
309(validate-range 'acos 'complex 'dble-power '(-1024 1024 8))
310(validate-range 'acos 'complex 'inv-dble-power '(-1024 1024 8))
311
312(validate-range 'atan 'complex 'power '(-2048 2048 32))
313(validate-range 'atan 'complex 'inv-power '(-2048 2048 32))
314(validate-range 'atan 'complex 'real-power '(-128 128) '((0.0 1.0) (0.0 -1.0)))
315(validate-range 'atan 'complex 'inv-real-power '(-128 128))
316(validate-range 'atan 'complex 'dble-power '(-1024 1024 8))
317(validate-range 'atan 'complex 'inv-dble-power '(-1024 1024 8))
318
319(validate-range 'atan 'values 'power '(-2048 2048 32))
320(validate-range 'atan 'values 'inv-power '(-2048 2048 32))
321(validate-range 'atan 'values 'real-power '(-128 128))
322(validate-range 'atan 'values 'inv-real-power '(-128 128))
323(validate-range 'atan 'values 'dble-power '(-1024 1024 8))
324(validate-range 'atan 'values 'inv-dble-power '(-1024 1024 8))
325
326(validate-range 'sinh 'complex 'power '(-7 7) nil '(-2048 2048 32))
327(validate-range 'sinh 'complex 'inv-power '(-2048 2048 32))
328(validate-range 'sinh 'complex 'real-power '(-7 7) nil '(-128 128))
329(validate-range 'sinh 'complex 'inv-real-power '(-128 128))
330(validate-range 'sinh 'complex 'dble-power '(-10 10) nil '(-1024 1024 8))
331(validate-range 'sinh 'complex 'inv-dble-power '(-1024 1024 8))
332
333(validate-range 'cosh 'complex 'power '(-7 7) nil '(-2048 2048 32))
334(validate-range 'cosh 'complex 'inv-power '(-2048 2048 32))
335(validate-range 'cosh 'complex 'real-power '(-7 7) nil '(-128 128))
336(validate-range 'cosh 'complex 'inv-real-power '(-128 128))
337(validate-range 'cosh 'complex 'dble-power '(-10 10) nil '(-1024 1024 8))
338(validate-range 'cosh 'complex 'inv-dble-power '(-1024 1024 8))
339
340(validate-range 'tanh 'complex 'power '(-2048 2048 32))
341(validate-range 'tanh 'complex 'inv-power '(-2048 2048 32))
342(validate-range 'tanh 'complex 'real-power '(-128 128))
343(validate-range 'tanh 'complex 'inv-real-power '(-128 128))
344(validate-range 'tanh 'complex 'dble-power '(-1024 1024 8))
345(validate-range 'tanh 'complex 'inv-dble-power '(-1024 1024 8))
346
347(validate-range 'asinh 'complex 'power '(-2048 2048 32))
348(validate-range 'asinh 'complex 'inv-power '(-2048 2048 32))
349(validate-range 'asinh 'complex 'real-power '(-128 128))
350(validate-range 'asinh 'complex 'inv-real-power '(-128 128))
351(validate-range 'asinh 'complex 'dble-power '(-1024 1024 8))
352(validate-range 'asinh 'complex 'inv-dble-power '(-1024 1024 8))
353
354(validate-range 'acosh 'complex 'power '(-2048 2048 32))
355(validate-range 'acosh 'complex 'inv-power '(-2048 2048 32))
356(validate-range 'acosh 'complex 'real-power '(-128 128))
357(validate-range 'acosh 'complex 'inv-real-power '(-128 128))
358(validate-range 'acosh 'complex 'dble-power '(-1024 1024 8))
359(validate-range 'acosh 'complex 'inv-dble-power '(-1024 1024 8))
360
361(validate-range 'atanh 'complex 'power '(-2048 2048 32))
362(validate-range 'atanh 'complex 'inv-power '(-2048 2048 32))
363(validate-range 'atanh 'complex 'real-power '(-128 128) '((1.0 0.0) (-1.0 0.0)))
364(validate-range 'atanh 'complex 'inv-real-power '(-128 128))
365(validate-range 'atanh 'complex 'dble-power '(-1024 1024 8))
366(validate-range 'atanh 'complex 'inv-dble-power '(-1024 1024 8))
367
368(validate-spot 'sqrt 'complex (expt 10 66) (expt 10 68))
369(validate-spot 'sqrt 'complex (expt 10 -66) (expt 10 -68))
370(validate-spot 'sqrt 'complex (expt 10 65) (expt 10 67))
371(validate-spot 'sqrt 'complex (expt 10 -65) (expt 10 -67))
372(validate-spot 'sqrt 'complex (/ (expt 10 65) 3) (expt 10 67))
373(validate-spot 'sqrt 'complex most-positive-single-float most-positive-single-float)
374(validate-spot 'sqrt 'complex least-positive-single-float most-positive-single-float)
375(validate-spot 'sqrt 'complex least-positive-single-float least-positive-single-float)
376(validate-spot 'sqrt 'complex most-positive-double-float most-positive-double-float)
377(validate-spot 'sqrt 'complex least-positive-double-float least-positive-double-float)
378
379(validate-spot 'log 'complex (expt 10 66) (expt 10 68))
380(validate-spot 'log 'complex (expt 10 -66) (expt 10 -68))
381(validate-spot 'log 'values 8.0d0 2 '((0 *)))
382(validate-spot 'log 'values #c(2 3) #c(4.5 7.8) '((0 *)))
383(validate-spot 'log 'complex 2 3)
384(validate-spot 'log 'complex 2.0 3.0)
385(validate-spot 'log 'complex 4.5 7.8)
386(validate-spot 'log 'complex most-positive-single-float most-positive-single-float)
387(validate-spot 'log 'complex least-positive-single-float most-positive-single-float)
388(validate-spot 'log 'complex least-positive-single-float least-positive-single-float)
389(validate-spot 'log 'complex most-positive-double-float most-positive-double-float)
390(validate-spot 'log 'complex least-positive-double-float least-positive-double-float)
391
392(validate-spot 'atan 'values (expt 10 66) (expt 10 68))
393(validate-spot 'atan 'values (expt 10 -66) (expt 10 -68))
394(validate-spot 'atan 'values 8.0d0 2)
395(validate-spot 'atan 'values most-positive-single-float most-positive-single-float)
396(validate-spot 'atan 'values least-positive-single-float least-positive-single-float)
397
398(validate-value 'atan 'values 0.0 0.0 0.0)
399(validate-value 'atan 'values 0.0 -0.0 (float pi 1.0))
400(validate-value 'atan 'values -0.0 0.0 -0.0)
401(validate-value 'atan 'values -0.0 -0.0 (- (float pi 1.0)))
402(validate-value 'atan 'values 0.0d0 0.0d0 0.0d0)
403(validate-value 'atan 'values 0.0d0 -0.0d0 pi)
404(validate-value 'atan 'values -0.0d0 0.0d0 -0.0d0)
405(validate-value 'atan 'values -0.0d0 -0.0d0 (- pi))
406
407(validate-value 'phase 'complex 0.0 0.0 0.0)
408(validate-value 'phase 'complex -0.0 0.0 (float pi 1.0))
409(validate-value 'phase 'complex 0.0 -0.0 -0.0)
410(validate-value 'phase 'complex -0.0 -0.0 (- (float pi 1.0)))
411(validate-value 'phase 'complex 0.0d0 0.0d0 0.0d0)
412(validate-value 'phase 'complex -0.0d0 0.0d0 pi)
413(validate-value 'phase 'complex 0.0d0 -0.0d0 -0.0d0)
414(validate-value 'phase 'complex -0.0d0 -0.0d0 (- pi))
415
416(validate-branch-cut 'sqrt :x t 'real-power '(-8 0) '(0))
417(validate-branch-cut 'sqrt :x nil 'real-power '(-8 0) nil '(0 0.0))
418(validate-branch-cut 'sqrt :x nil 'real-power '(0 8))
419(validate-branch-cut 'sqrt :y nil 'real-power '(-8 8))
420(validate-branch-cut 'sqrt :x t 'dble-power '(-8 0) '(0))
421(validate-branch-cut 'sqrt :x nil 'dble-power '(-8 0) nil '(0 0.0))
422(validate-branch-cut 'sqrt :x nil 'dble-power '(0 8))
423(validate-branch-cut 'sqrt :y nil 'dble-power '(-8 8))
424
425(validate-branch-cut 'phase :x t 'real-power '(-8 0) '(0))
426(validate-branch-cut 'phase :x nil 'real-power '(-8 0) nil '(0 0.0))
427(validate-branch-cut 'phase :x nil 'real-power '(0 8))
428(validate-branch-cut 'phase :y nil 'real-power '(-8 -1))
429(validate-branch-cut 'phase :y nil 'real-power '(1 8))
430(validate-branch-cut 'phase :x t 'dble-power '(-8 0) '(0))
431(validate-branch-cut 'phase :x nil 'dble-power '(-8 0) nil '(0 0.0))
432(validate-branch-cut 'phase :x nil 'dble-power '(0 8))
433(validate-branch-cut 'phase :y nil 'dble-power '(-8 -1))
434(validate-branch-cut 'phase :y nil 'dble-power '(1 8))
435
436(validate-branch-cut 'log :x t 'real-power '(-8 -1))
437(validate-branch-cut 'log :x nil 'real-power '(-8 -1) nil '(0 0.0))
438(validate-branch-cut 'log :x nil 'real-power '(1 8))
439(validate-branch-cut 'log :y nil 'real-power '(-8 -1))
440(validate-branch-cut 'log :y nil 'real-power '(1 8))
441(validate-branch-cut 'log :x t 'dble-power '(-8 -1))
442(validate-branch-cut 'log :x nil 'dble-power '(-8 -1) nil '(0 0.0))
443(validate-branch-cut 'log :x nil 'dble-power '(1 8))
444(validate-branch-cut 'log :y nil 'dble-power '(-8 -1))
445(validate-branch-cut 'log :y nil 'dble-power '(1 8))
446
447(validate-branch-cut 'asin :x t 'real-power '(-8 -1) '(-1))
448(validate-branch-cut 'asin :x t 'real-power '(1 8) '(1))
449(validate-branch-cut 'asin :x nil 'float '(-1 1 1/10))
450(validate-branch-cut 'asin :x nil 'real-power '(-8 -1) nil '(0 0.0))
451(validate-branch-cut 'asin :x nil 'real-power '(1 8) nil '(0 -0.0))
452(validate-branch-cut 'asin :y nil 'real-power '(-8 8))
453(validate-branch-cut 'asin :x t 'dble-power '(-8 -1) '(-1))
454(validate-branch-cut 'asin :x t 'dble-power '(1 8) '(1))
455(validate-branch-cut 'asin :x nil 'dble-float '(-1 1 1/10))
456(validate-branch-cut 'asin :x nil 'dble-power '(-8 -1) nil '(0 0.0))
457(validate-branch-cut 'asin :x nil 'dble-power '(1 8) nil '(0 -0.0))
458(validate-branch-cut 'asin :y nil 'dble-power '(-8 8))
459
460(validate-branch-cut 'acos :x t 'real-power '(-8 -1) '(-1))
461(validate-branch-cut 'acos :x t 'real-power '(1 8) '(1))
462(validate-branch-cut 'acos :x nil 'float '(-1 1 1/10))
463(validate-branch-cut 'acos :x nil 'real-power '(-8 -1) nil '(0 0.0))
464(validate-branch-cut 'acos :x nil 'real-power '(1 8) nil '(0 -0.0))
465(validate-branch-cut 'acos :y nil 'real-power '(-8 8))
466(validate-branch-cut 'acos :x t 'dble-power '(-8 -1) '(-1))
467(validate-branch-cut 'acos :x t 'dble-power '(1 8) '(1))
468(validate-branch-cut 'acos :x nil 'dble-float '(-1 1 1/10))
469(validate-branch-cut 'acos :x nil 'dble-power '(-8 -1) nil '(0 0.0))
470(validate-branch-cut 'acos :x nil 'dble-power '(1 8) nil '(0 -0.0))
471(validate-branch-cut 'acos :y nil 'dble-power '(-8 8))
472
473(validate-branch-cut 'atan :y t 'real-power '(-8 -2))
474(validate-branch-cut 'atan :y t 'real-power '(2 8))
475(validate-branch-cut 'atan :y nil 'float '(-19/20 19/20 1/10))
476(validate-branch-cut 'atan :y nil 'power '(-8 -2) nil '(0 -0.0))
477(validate-branch-cut 'atan :y nil 'power '(2 8) nil '(0 0.0))
478(validate-branch-cut 'atan :x nil 'real-power '(-8 8))
479(validate-branch-cut 'atan :y t 'dble-power '(-8 -2))
480(validate-branch-cut 'atan :y t 'dble-power '(2 8))
481(validate-branch-cut 'atan :y nil 'dble-float '(-19/20 19/20 1/10))
482(validate-branch-cut 'atan :x nil 'dble-power '(-8 8))
483
484(validate-branch-cut 'asinh :y t 'real-power '(-8 -1) '(-1))
485(validate-branch-cut 'asinh :y t 'real-power '(1 8) '(1))
486(validate-branch-cut 'asinh :y nil 'float '(-1 1 1/10))
487(validate-branch-cut 'asinh :y nil 'power '(-8 -1) nil '(0 -0.0))
488(validate-branch-cut 'asinh :y nil 'power '(1 8) nil '(0 0.0))
489(validate-branch-cut 'asinh :x nil 'real-power '(-8 8))
490(validate-branch-cut 'asinh :y t 'dble-power '(-8 -1) '(-1))
491(validate-branch-cut 'asinh :y t 'dble-power '(1 8) '(1))
492(validate-branch-cut 'asinh :y nil 'dble-float '(-1 1 1/10))
493(validate-branch-cut 'asinh :x nil 'dble-power '(-8 8))
494
495(validate-branch-cut 'acosh :x t 'real-power '(-8 -1))
496(validate-branch-cut 'acosh :x t 'float '(-1 1 1/10) '(1))
497(validate-branch-cut 'acosh :x nil 'real-power '(-8 -1) nil '(0 0.0))
498(validate-branch-cut 'acosh :x nil 'float '(-1 1 1/10) nil '(0 0.0))
499(validate-branch-cut 'acosh :x nil 'real-power '(1 8))
500(validate-branch-cut 'acosh :y nil 'real-power '(-8 -1))
501(validate-branch-cut 'acosh :y nil 'real-power '(1 8))
502(validate-branch-cut 'acosh :x t 'dble-power '(-8 -1))
503(validate-branch-cut 'acosh :x t 'dble-float '(-1 1 1/10) '(1))
504(validate-branch-cut 'acosh :x nil 'dble-power '(-8 -1) nil '(0 0.0))
505(validate-branch-cut 'acosh :x nil 'dble-float '(-1 1 1/10) nil '(0 0.0))
506(validate-branch-cut 'acosh :x nil 'dble-power '(1 8))
507(validate-branch-cut 'acosh :y nil 'dble-power '(-8 -1))
508(validate-branch-cut 'acosh :y nil 'dble-power '(1 8))
509
510(validate-branch-cut 'atanh :x t 'real-power '(-8 -2))
511(validate-branch-cut 'atanh :x t 'real-power '(2 8))
512(validate-branch-cut 'atanh :x nil 'float '(-19/20 19/20 1/10))
513(validate-branch-cut 'atanh :x nil 'real-power '(-8 -2) nil '(0 0.0))
514(validate-branch-cut 'atanh :x nil 'real-power '(2 8) nil '(0 -0.0))
515(validate-branch-cut 'atanh :y nil 'real-power '(-8 8))
516(validate-branch-cut 'atanh :x t 'dble-power '(-8 -2))
517(validate-branch-cut 'atanh :x t 'dble-power '(2 8))
518(validate-branch-cut 'atanh :x nil 'dble-float '(-19/20 19/20 1/10))
519(validate-branch-cut 'atanh :x nil 'dble-power '(-8 -2) nil '(0 0.0))
520(validate-branch-cut 'atanh :x nil 'dble-power '(2 8) nil '(0 -0.0))
521(validate-branch-cut 'atanh :y nil 'dble-power '(-8 8))
522
523(validate-pole 'log 0.0 'power '(1 17))
524(validate-pole 'log 0.0d0 'power '(1 33 2))
525(validate-pole 'log 0 'power '(1 125 8))
526
527(validate-pole 'atan #c(0.0 1.0) 'power '(1 17))
528(validate-pole 'atan #c(0.0d0 1.0d0) 'power '(1 33 2))
529(validate-pole 'atan #c(0 1) 'power '(1 125 8))
530(validate-pole 'atan #c(0.0 -1.0) 'power '(1 17))
531(validate-pole 'atan #c(0.0d0 -1.0d0) 'power '(1 33 2))
532(validate-pole 'atan #c(0 -1) 'power '(1 125 8))
533
534(validate-pole 'atanh 1.0 'power '(1 17))
535(validate-pole 'atanh 1.0d0 'power '(1 33 2))
536(validate-pole 'atanh 1 'power '(1 125 8))
537(validate-pole 'atanh -1.0 'power '(1 17))
538(validate-pole 'atanh -1.0d0 'power '(1 33 2))
539(validate-pole 'atanh -1 'power '(1 125 8))
540
541)