In documentation for lreduce and rreduce, supply second argument as an explicit list
[maxima.git] / src / numerical / slatec / dbesk0.lisp
blobdf03b0634e345992d73d5fe30d834b53e69e7809
1 ;;; Compiled by f2cl version:
2 ;;; ("f2cl1.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $"
3 ;;; "f2cl2.l,v 96616d88fb7e 2008/02/22 22:19:34 rtoy $"
4 ;;; "f2cl3.l,v 96616d88fb7e 2008/02/22 22:19:34 rtoy $"
5 ;;; "f2cl4.l,v 96616d88fb7e 2008/02/22 22:19:34 rtoy $"
6 ;;; "f2cl5.l,v 46c1f6a93b0d 2012/05/03 04:40:28 toy $"
7 ;;; "f2cl6.l,v 1d5cbacbb977 2008/08/24 00:56:27 rtoy $"
8 ;;; "macros.l,v fceac530ef0c 2011/11/26 04:02:26 toy $")
10 ;;; Using Lisp CMU Common Lisp snapshot-2012-04 (20C Unicode)
11 ;;;
12 ;;; Options: ((:prune-labels nil) (:auto-save t) (:relaxed-array-decls t)
13 ;;; (:coerce-assigns :as-needed) (:array-type ':simple-array)
14 ;;; (:array-slicing nil) (:declare-common nil)
15 ;;; (:float-format double-float))
17 (in-package :slatec)
20 (let ((ntk0 0)
21 (xsml 0.0)
22 (xmax 0.0)
23 (bk0cs
24 (make-array 16
25 :element-type 'double-float
26 :initial-contents '(-0.03532739323390277 0.3442898999246285
27 0.0359799365153615 0.001264615411446926
28 2.286212103119452e-5
29 2.5347910790261494e-7
30 1.904516377220209e-9
31 1.0349695257633625e-11
32 4.2598161427910826e-14
33 1.3744654358807508e-16
34 3.5708965285083736e-19
35 7.631643660116437e-22
36 1.365424988440782e-24
37 2.075275266906668e-27
38 2.7128142180729857e-30
39 3.0825938879146666e-33)))
40 (first$ nil))
41 (declare (type (f2cl-lib:integer4) ntk0)
42 (type (double-float) xsml xmax)
43 (type (simple-array double-float (16)) bk0cs)
44 (type f2cl-lib:logical first$))
45 (setq first$ f2cl-lib:%true%)
46 (defun dbesk0 (x)
47 (declare (type (double-float) x))
48 (prog ((xmaxt 0.0) (y 0.0) (dbesk0 0.0))
49 (declare (type (double-float) dbesk0 y xmaxt))
50 (cond
51 (first$
52 (setf ntk0
53 (initds bk0cs 16
54 (* 0.1f0 (f2cl-lib:freal (f2cl-lib:d1mach 3)))))
55 (setf xsml (f2cl-lib:fsqrt (* 4.0 (f2cl-lib:d1mach 3))))
56 (setf xmaxt (- (f2cl-lib:flog (f2cl-lib:d1mach 1))))
57 (setf xmax
58 (+ xmaxt
59 (/ (* -0.5 xmaxt (f2cl-lib:flog xmaxt)) (+ xmaxt 0.5))))))
60 (setf first$ f2cl-lib:%false%)
61 (if (<= x 0.0) (xermsg "SLATEC" "DBESK0" "X IS ZERO OR NEGATIVE" 2 2))
62 (if (> x 2.0) (go label20))
63 (setf y 0.0)
64 (if (> x xsml) (setf y (* x x)))
65 (setf dbesk0
66 (+ (- (* (- (f2cl-lib:flog (* 0.5 x))) (dbesi0 x)) 0.25)
67 (dcsevl (- (* 0.5 y) 1.0) bk0cs ntk0)))
68 (go end_label)
69 label20
70 (setf dbesk0 0.0)
71 (if (> x xmax) (xermsg "SLATEC" "DBESK0" "X SO BIG K0 UNDERFLOWS" 1 1))
72 (if (> x xmax) (go end_label))
73 (setf dbesk0 (* (exp (- x)) (dbsk0e x)))
74 (go end_label)
75 end_label
76 (return (values dbesk0 nil)))))
78 (in-package #:cl-user)
79 #+#.(cl:if (cl:find-package '#:f2cl) '(and) '(or))
80 (eval-when (:load-toplevel :compile-toplevel :execute)
81 (setf (gethash 'fortran-to-lisp::dbesk0
82 fortran-to-lisp::*f2cl-function-info*)
83 (fortran-to-lisp::make-f2cl-finfo :arg-types '((double-float))
84 :return-values '(nil)
85 :calls '(fortran-to-lisp::dbsk0e
86 fortran-to-lisp::dcsevl
87 fortran-to-lisp::dbesi0
88 fortran-to-lisp::xermsg
89 fortran-to-lisp::initds
90 fortran-to-lisp::d1mach))))