Rename tab to datatab in numeric/interpol.mac
[maxima.git] / src / maxima-package.lisp
blobf02ef98f41abd0c365822648478ace9bdf08fbb1
1 (in-package :common-lisp-user)
3 (defpackage :pregexp
4 (:use :common-lisp)
5 (:export
6 ;; These exports are the regexp procedures mentioned in the manual.
7 #:pregexp
8 #:pregexp-match-positions
9 #:pregexp-match
10 #:pregexp-split
11 #:pregexp-replace
12 #:pregexp-replace*
13 #:pregexp-quote))
15 (defpackage :cl-info
16 (:use :common-lisp))
18 (defpackage :command-line
19 (:use :common-lisp)
20 (:nicknames :cmdline)
21 (:export #:cl-option #:make-cl-option #:list-cl-options #:process-args
22 #:get-application-args))
24 ;; Kevin Rosenberg's getopt package
25 (defpackage getopt
26 (:use :cl)
27 (:export #:match-unique-abbreviation
28 #:getopt))
30 ;; GCL has SLOOP built in but it's slightly different now...
31 (defpackage :cl-sloop
32 (:use :common-lisp)
33 (:export #:sloop))
35 (defpackage :maxima
36 (:use :common-lisp :command-line)
37 (:nicknames :cl-macsyma :cl-maxima :macsyma)
38 (:import-from :cl-sloop #:sloop)
39 (:shadow continue ;(macsys): part of the top-level loop
40 // ;(clmacs): arithmetic operator
41 float ;(clmacs): has 1.0 as default format
42 functionp ;(commac): accepts symbols
43 array ;(commac)
44 exp ;various files declare this special
45 signum ;(commac): same except
46 ; (cl:signum 1.3)==1.0 not 1 but I (?)
47 ; think this is ok for macsyma
48 asin acos asinh acosh atanh ;different for complex numbers
49 tanh cosh sinh tan ;(trigi): same, could remove from trigi
50 break ; special variable in displa.lisp
51 gcd ; special in rat module
53 #+gcl
54 (:import-from :system
55 ;; Faster modular arithmetic.
56 ;; Unfortunately, as S. Macrakis observed (bug #706562),
57 ;; SI::CMOD currently behaves in a strange way:
58 ;; (let ((si::modulus 4)) (si::cmod 2)) => 2
59 ;; (let ((si::modulus 4)) (si::cmod -2)) => -2
60 #:modulus #:cmod #:ctimes #:cdifference #:cplus
62 #:getpid #:get-instream
63 #:short-name #:cleanup #:instream-stream-name #:instream-line
64 #:instream-name #:instream-stream #:stream-name #:complete-prop
65 #:*stream-alist* #:break-call))
68 (defpackage :mt19937
69 (:use :common-lisp)
70 (:shadow #:random-state
71 #:random-state-p
72 #:random
73 #:*random-state*
74 #:make-random-state)
75 (:export #:random-state
76 #:random-state-p
77 #:random
78 #:*random-state*
79 #:make-random-state
80 #:%random-single-float
81 #:%random-double-float
82 #+(or scl clisp) #:%random-long-float
83 #+cmu #:%random-double-double-float
84 #:random-chunk
85 #:init-random-state))
87 ;; This package is for the implementation of the BIGFLOAT routines that
88 ;; make working with Maxima's bfloat objects somewhat easier by
89 ;; extending the standard CL numeric functions to work with BIGFLOAT
90 ;; and COMPLEX-BIGFLOAT objects. See src/numeric.lisp for the
91 ;; implementation.
92 (defpackage bigfloat-impl
93 (:use :cl)
94 (:shadow #:+
95 #:-
96 #:*
97 #:/
98 #:1+
99 #:1-
100 #:zerop
101 #:plusp
102 #:minusp
103 #:abs
104 #:sqrt
105 #:log
106 #:exp
107 #:sin
108 #:cos
109 #:tan
110 #:asin
111 #:acos
112 #:atan
113 #:sinh
114 #:cosh
115 #:tanh
116 #:asinh
117 #:acosh
118 #:atanh
119 #:expt
121 #:/=
124 #:<=
125 #:>=
126 #:scale-float
127 #:realpart
128 #:imagpart
129 #:complex
130 #:conjugate
131 #:max
132 #:min
133 #:cis
134 #:phase
135 #:floor
136 #:ffloor
137 #:incf
138 #:decf
139 #:realp
140 #:complexp
141 #:numberp
142 #:integer-decode-float
143 #:decode-float
144 #:float
145 #:ceiling
146 #:fceiling
147 #:truncate
148 #:ftruncate
149 #:round
150 #:fround
151 #:random
152 #:signum
153 #:float-sign
154 #:float-digits
155 #:rational
156 #:rationalize
157 #:coerce
159 ;; If any of these exported symbols are updated, update the
160 ;; shadowing-import-from list for BIGFLOAT too!
162 ;; Export types
163 (:export #:bigfloat
164 #:complex-bigfloat)
165 ;; Export functions
166 (:export #:bigfloat
167 #:to
168 #:maybe-to
169 #:epsilon
170 #:%pi
171 #:%e
172 ;; CL equivalents
177 #:1+
178 #:1-
179 #:zerop
180 #:plusp
181 #:minusp
182 #:abs
183 #:sqrt
184 #:log
185 #:exp
186 #:sin
187 #:cos
188 #:tan
189 #:asin
190 #:acos
191 #:atan
192 #:sinh
193 #:cosh
194 #:tanh
195 #:asinh
196 #:acosh
197 #:atanh
198 #:expt
200 #:/=
203 #:<=
204 #:>=
205 #:scale-float
206 #:realpart
207 #:imagpart
208 #:complex
209 #:conjugate
210 #:max
211 #:min
212 #:cis
213 #:phase
214 #:floor
215 #:ffloor
216 #:incf
217 #:decf
218 #:realp
219 #:complexp
220 #:numberp
221 #:integer-decode-float
222 #:decode-float
223 #:float
224 #:ceiling
225 #:fceiling
226 #:truncate
227 #:ftruncate
228 #:round
229 #:fround
230 #:random
231 #:signum
232 #:float-sign
233 #:float-digits
234 #:rational
235 #:rationalize
236 #:coerce
239 ;; BIGFLOAT is the package intended to be used for applications
240 ;; using the routines from the BIGFLOAT-IMPL.
241 (defpackage bigfloat
242 (:use :cl :bigfloat-impl)
243 ;; This list should match the SHADOWING-IMPORT-FROM list in
244 ;; BIGFLOAT-IMPL.
245 (:shadowing-import-from #:bigfloat-impl
250 #:1+
251 #:1-
252 #:zerop
253 #:plusp
254 #:minusp
255 #:abs
256 #:sqrt
257 #:log
258 #:exp
259 #:sin
260 #:cos
261 #:tan
262 #:asin
263 #:acos
264 #:atan
265 #:sinh
266 #:cosh
267 #:tanh
268 #:asinh
269 #:acosh
270 #:atanh
271 #:expt
273 #:/=
276 #:<=
277 #:>=
278 #:scale-float
279 #:realpart
280 #:imagpart
281 #:complex
282 #:conjugate
283 #:max
284 #:min
285 #:cis
286 #:phase
287 #:floor
288 #:ffloor
289 #:incf
290 #:decf
291 #:realp
292 #:complexp
293 #:numberp
294 #:integer-decode-float
295 #:decode-float
296 #:float
297 #:ceiling
298 #:fceiling
299 #:truncate
300 #:ftruncate
301 #:round
302 #:fround
303 #:random
304 #:signum
305 #:float-sign
306 #:float-digits
307 #:rational
308 #:rationalize
309 #:coerce
311 (:export #:lentz
312 #:sum-power-series
313 #:format-e
314 #:format-f
315 #:format-g))
317 ;; Export all the external symbols in BIGFLOAT-IMPL from BIGFLOAT too.
318 (do-external-symbols (s '#:bigfloat-impl)
319 (export s '#:bigfloat))
321 ;; For CMUCL, we lock the bigfloat-impl package so we don't
322 ;; accidentally modify the implementation.
323 #+cmu
324 (defun lock-maxima-packages ()
325 (let ((package-names '(#:bigfloat-impl)))
326 (dolist (p package-names)
327 (let ((p (find-package p)))
328 (when p
329 (setf (package-definition-lock p) t)
330 (setf (package-lock p) t)))))
331 (values))
334 #+cmu
335 (progn
336 (lock-maxima-packages)
337 (pushnew 'lock-maxima-packages ext:*after-save-initializations*))
340 ;; Some versions of CMUCL already have a compatible version of INTL,
341 ;; so skip it if we have it. CMUCL will already define the INTL
342 ;; package correctly.
344 #+#.(cl:if (cl:and (cl:member :cmu cl:*features*) (cl:find-package '#:intl)) '(or) '(and))
345 (defpackage :intl
346 (:use :common-lisp)
347 (:export #:setlocale #:textdomain #:gettext #:dgettext
348 #:ngettext #:dngettext
349 #:*translatable-dump-stream* #:*locale*
350 #:*locale-directories*
351 #:read-translatable-string))
353 ;; (getalias '$lambda) => CL:LAMBDA, which implies that Maxima parses lambda as CL:LAMBDA.
354 ;; Unlocking the :common-lisp package seems to be the simplest way to avoid an error.
355 ;; (Shadowing LAMBDA causes errors and removing the alias causes some other errors. Oh well.)
356 #+(and sbcl sb-package-locks) (sb-ext:unlock-package :common-lisp)
358 (provide :maxima)