Use 1//2 instead of ((rat simp) 1 2)
[maxima.git] / src / numerical / slatec / dbesi0.lisp
blob2151dde5716528c600e03a49513a1d1f420c78eb
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 ((nti0 0)
21 (xsml 0.0)
22 (xmax 0.0)
23 (bi0cs
24 (make-array 18
25 :element-type 'double-float
26 :initial-contents '(-0.07660547252839145 1.9273379539938083
27 0.22826445869203013 0.013048914667072904
28 4.3442709008164877e-4
29 9.422657686001934e-6
30 1.434006289510691e-7
31 1.613849069661749e-9
32 1.3966500445356697e-11
33 9.579451725505446e-14
34 5.333981859862503e-16
35 2.4587160884374706e-18
36 9.53568089024877e-21
37 3.154382039721427e-23
38 9.004564101094637e-26
39 2.24064736912367e-28
40 4.9030346032428375e-31
41 9.508172606122666e-34)))
42 (first$ nil))
43 (declare (type (f2cl-lib:integer4) nti0)
44 (type (double-float) xsml xmax)
45 (type (simple-array double-float (18)) bi0cs)
46 (type f2cl-lib:logical first$))
47 (setq first$ f2cl-lib:%true%)
48 (defun dbesi0 (x)
49 (declare (type (double-float) x))
50 (prog ((y 0.0) (dbesi0 0.0))
51 (declare (type (double-float) dbesi0 y))
52 (cond
53 (first$
54 (setf nti0
55 (initds bi0cs 18
56 (* 0.1f0 (f2cl-lib:freal (f2cl-lib:d1mach 3)))))
57 (setf xsml (f2cl-lib:fsqrt (* 4.5 (f2cl-lib:d1mach 3))))
58 (setf xmax (f2cl-lib:flog (f2cl-lib:d1mach 2)))))
59 (setf first$ f2cl-lib:%false%)
60 (setf y (abs x))
61 (if (> y 3.0) (go label20))
62 (setf dbesi0 1.0)
63 (if (> y xsml)
64 (setf dbesi0 (+ 2.75 (dcsevl (- (/ (* y y) 4.5) 1.0) bi0cs nti0))))
65 (go end_label)
66 label20
67 (if (> y xmax)
68 (xermsg "SLATEC" "DBESI0" "ABS(X) SO BIG I0 OVERFLOWS" 2 2))
69 (setf dbesi0 (* (exp y) (dbsi0e x)))
70 (go end_label)
71 end_label
72 (return (values dbesi0 nil)))))
74 (in-package #:cl-user)
75 #+#.(cl:if (cl:find-package '#:f2cl) '(and) '(or))
76 (eval-when (:load-toplevel :compile-toplevel :execute)
77 (setf (gethash 'fortran-to-lisp::dbesi0
78 fortran-to-lisp::*f2cl-function-info*)
79 (fortran-to-lisp::make-f2cl-finfo :arg-types '((double-float))
80 :return-values '(nil)
81 :calls '(fortran-to-lisp::dbsi0e
82 fortran-to-lisp::xermsg
83 fortran-to-lisp::dcsevl
84 fortran-to-lisp::initds
85 fortran-to-lisp::d1mach))))