R example clarified for loading.
[CommonLispStat.git] / src / packages.lisp
blobb6c78237f6f4ccce480137f925550982bd85e531
1 ;;; -*- mode: lisp -*-
3 ;;; Time-stamp: <2010-01-03 16:21:25 tony>
4 ;;; Creation: <2008-03-11 19:18:34 user>
5 ;;; File: packages.lisp
6 ;;; Author: AJ Rossini <blindglobe@gmail.com>
7 ;;; Copyright: (c)2007--2010, AJ Rossini. MIT License. See
8 ;;; LICENSE.mit in top level directory for details.
9 ;;; Purpose: packages for Common Lisp Statistics
11 ;;; What is this talk of 'release'? Klingons do not make software
12 ;;; 'releases'. Our software 'escapes', leaving a bloody trail of
13 ;;; designers and quality assurance people in its wake.
15 (in-package :cl-user)
17 ;;; Current structure, dependencies:
19 '((:ls-user :depends-on lisp-stat)
20 (:lisp-stat :depends-on '(cls-dataframe
21 cls-data
22 lisp-matrix
24 (:cls-data :depends-on )
25 (:cls-dataframe :depends-on cls-data)
26 (:cls-dataio : )
27 (:cls-datatrans : )
28 |#
32 ;;; Basics
34 (defpackage :lisp-stat-object-system
35 (:nicknames :ls-objects :lsos)
36 (:use :common-lisp)
37 (:shadow :call-method :call-next-method)
38 (:export ls-object objectp *object* kind-of-p make-object
39 *message-hook*
40 *set-slot-hook* proto-slot-value self
41 send call-next-method call-method
42 defmeth defproto instance-slots proto-name))
44 ;;; -types and -float probably ought to be moved into a -numerics
45 ;;; package.
47 (defpackage :lisp-stat-types
48 (:documentation "Provides some typeing for LispStat, but is clearly
49 a bit incomplete.")
50 (:use :common-lisp)
51 (:export fixnump
52 check-nonneg-fixnum check-one-nonneg-fixnum
53 check-one-fixnum check-one-real check-one-number))
55 (defpackage :lisp-stat-float
56 (:use :common-lisp)
57 (:export +stat-float-typing+ +stat-cfloat-typing+ +stat-float-template+
58 machine-epsilon base-float makedouble
60 make-base-trans-fun-2 make-base-trans-fun
62 base-log base-exp base-expt base-sqrt base-sin base-cos
63 base-tan base-asin base-acos base-atan base-sinh
64 BASE-COSH BASE-TANH BASE-ASINH BASE-ACOSH BASE-ATANH
65 BASE-ABS BASE-PHASE BASE-FFLOOR BASE-FCEILING BASE-FTRUNCATE
66 BASE-FROUND BASE-SIGNUM BASE-CIS))
68 ;;; Probably should move into cls-data package.
70 (defpackage :lisp-stat-compound-data
71 (:use :common-lisp
72 :lisp-stat-object-system
73 :lisp-stat-types)
74 (:shadowing-import-from :lisp-stat-object-system
75 call-next-method call-method)
76 (:export compound-data-p *compound-data-proto*
77 compound-object-p
78 compound-data-seq compound-data-length
79 element-list element-seq
80 sort-data order rank
81 recursive-map-elements map-elements repeat
82 check-sequence
83 get-next-element make-next-element set-next-element
84 ;; sequencep
85 iseq ordered-nneg-seq
86 select split-list which
87 difference rseq
88 flatten-list))
90 (defpackage :lisp-stat-macros
91 (:use :common-lisp
92 :lisp-stat-compound-data)
93 (:export make-rv-function make-rv-function-1))
95 (defpackage :lisp-stat-basics
96 (:use :common-lisp
97 :lisp-stat-object-system
98 :lisp-stat-types
99 :lisp-stat-float
100 :lisp-stat-macros
101 :lisp-stat-compound-data)
102 (:shadowing-import-from :lisp-stat-object-system
103 call-method call-next-method)
104 (:export permute-array sum prod count-elements mean
105 if-else sample))
107 (defpackage :lisp-stat-float
108 (:use :common-lisp)
109 (:export +stat-float-typing+ +stat-cfloat-typing+ +stat-float-template+
110 machine-epsilon base-float makedouble
112 make-base-trans-fun-2 make-base-trans-fun
114 BASE-LOG BASE-EXP BASE-EXPT BASE-SQRT BASE-SIN BASE-COS
115 BASE-TAN BASE-ASIN BASE-ACOS BASE-ATAN BASE-SINH
116 BASE-COSH BASE-TANH BASE-ASINH BASE-ACOSH BASE-ATANH
117 BASE-ABS BASE-PHASE BASE-FFLOOR BASE-FCEILING BASE-FTRUNCATE
118 BASE-FROUND BASE-SIGNUM BASE-CIS))
120 (defpackage :lisp-stat-macros
121 (:use :common-lisp
122 :lisp-stat-compound-data)
123 (:export make-rv-function make-rv-function-1))
126 (defpackage :cls-matrix
127 (:documentation "basic utilities for using lisp arrays as numerical
128 matrices. Not optimized, and must consider this slow. Routines
129 should be optimized, it is only that we need them first, optimize
130 them later.")
131 (:use :common-lisp)
132 (:export matrixp num-rows num-cols matmult identity-matrix diagonal
133 row-list column-list inner-product outer-product
134 cross-product transpose bind-columns bind-rows
135 array-data-vector vector-to-array))
138 ;;; NEW CLOS STRUCTURE
140 ;; CLS-DATA contains the basic variable structure, classes, support/indexing, and mixins.
141 ;; CLS-DATAFRAME leverages CLS-DATA, XARRAY, and LISP-MATRIX
142 ;; CLS-DATAIO stores/saves structures
143 ;; CLS-DATATRANS converts between structures, and from DATAFRAMES to MODEL-MATRIXES
145 (defpackage :cls-data
146 (:use :common-lisp)
147 (:shadowing-import-from :xarray slice)
148 (:export
149 ;; must work out what is needed for stat variable metadata, support
150 ;; functions, etc
153 ;;; cls-data... in dataframe, though.
154 (defpackage :cls-dataframe
155 (:use :common-lisp
156 :cls-data
157 :xarray
158 :lisp-matrix)
159 (:shadowing-import-from :xarray slice)
160 (:export
161 ;; generic container class for data -- if small enough
162 ;; could be value, otherwise might be reference.
163 dataframe-like
164 dataframe-array
165 make-dataframe
167 dataset
168 list-of-columns ;; list-of-variables
169 list-of-rows ;; list-of-observations
171 ;; accessors
172 varlabels caselabels nrows ncols
173 dataframe-dimension dataframe-dimensons
174 xref xtype xdims xdim xrank slice take carray
176 ;; support
177 make-labels
180 (defpackage :cls-dataio
181 (:documentation "Data I/O and similar import technologies.")
182 (:use :common-lisp
183 :rsm.string
184 :lisp-stat-object-system
185 :cls-data
186 :cls-dataframe)
187 (:shadowing-import-from :lisp-stat-object-system
188 call-method call-next-method)
189 (:export dsvstream->dataframe
190 dsvstream->matrix
191 dsvstream->listoflist
193 filename.dsv->dataframe
196 (defpackage :cls-datatrans
197 (:documentation "Data I/O and similar import technologies.")
198 (:use :common-lisp
199 :listoflist
200 :lisp-stat-object-system
201 :cls-data
202 :cls-dataframe)
203 (:shadowing-import-from :lisp-stat-object-system
204 call-method call-next-method)
205 (:export listoflist->dataframe dataframe->listoflist
206 listoflist->array array->listoflist
207 listoflist->matrix-like matrix-like->listoflist
211 ;;;; MODELING
213 (defpackage :lisp-stat-model
214 (:documentation "Model management for data analysis.")
215 (:use :common-lisp
216 :lisp-matrix)
217 (:export
218 ;; data structures for model and model/data combination
219 model statistical-model analysis))
221 ;;; visualization
223 (defpackage :cls-visualize
224 (:use :common-lisp
225 :lisp-matrix
226 :cls-dataframe)
227 (:shadowing-import-from :xarray slice)
231 (defpackage :cls-visualize-plplot
232 (:use :common-lisp
233 :lisp-matrix
234 :cls-dataframe
235 :cl-plplot-system)
236 (:export
237 ;; examples
238 plot-ex contour-plot-ex fn-contour-plot-ex shade-plot-ex 3D-plot-ex))
241 ;;; USER PACKAGES
243 (defpackage :lisp-stat-ffi-int
244 (:use :common-lisp
245 :cffi)
246 (:export ccl-store-integer ccl-store-double ccl-store-ptr
247 get-buf ))
249 (defpackage :lisp-stat-probability
250 (:use :common-lisp
251 :cffi
252 :lisp-stat-ffi-int
253 :lisp-stat-macros)
254 (:export log-gamma set-seed
255 uniform-rand
256 normal-cdf normal-quant normal-dens normal-rand
257 bivnorm-cdf
258 cauchy-cdf cauchy-quant cauchy-dens cauchy-rand
259 gamma-cdf gamma-quant gamma-dens gamma-rand
260 chisq-cdf chisq-quant chisq-dens chisq-rand
261 beta-cdf beta-quant beta-dens beta-rand
262 t-cdf t-quant t-dens t-rand
263 f-cdf f-quant f-dens f-rand
264 poisson-cdf poisson-quant poisson-pmf poisson-rand
265 binomial-cdf binomial-quant binomial-pmf binomial-rand))
269 (defpackage :lisp-stat-math
270 (:use :common-lisp
271 :lisp-stat-object-system
272 :lisp-stat-macros
273 :lisp-stat-compound-data
274 :lisp-stat-float)
275 (:shadowing-import-from :lisp-stat-object-system
276 call-method call-next-method)
277 (:shadow expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan
278 asin acos atan sinh cosh tanh asinh acosh atanh float random
279 truncate floor ceiling round minusp zerop plusp evenp oddp
280 < <= = /= >= > ;; complex
281 conjugate realpart imagpart phase
282 min max logand logior logxor lognot ffloor fceiling
283 ftruncate fround signum cis)
284 (:export ^ ** expt + - * / mod rem pmin pmax abs 1+ 1- log exp sqrt sin cos
285 tan asin acos atan sinh cosh tanh asinh acosh atanh float random
286 truncate floor ceiling round minusp zerop plusp evenp oddp < <= =
287 /= >= > ;; complex
288 conjugate realpart imagpart phase min max
289 logand logior logxor lognot ffloor fceiling ftruncate fround
290 signum cis)
291 (:documentation "Vectorization of numerical functions"))
294 #| ;; some of this goes back in, but not all of it?
295 (defpackage :lisp-stat-linalg
296 (:use :common-lisp
297 :cffi
298 :lisp-matrix
299 :lisp-stat-math
300 :lisp-stat-types
301 :lisp-stat-float
302 :lisp-stat-compound-data)
303 (:shadowing-import-from :lisp-stat-math
304 expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan
305 asin acos atan sinh cosh tanh asinh acosh atanh float random
306 truncate floor ceiling round minusp zerop plusp evenp oddp
307 < <= = /= >= > complex conjugate realpart imagpart phase
308 min max logand logior logxor lognot ffloor fceiling
309 ftruncate fround signum cis)
310 (:export chol-decomp lu-decomp lu-solve determinant inverse
311 sv-decomp qr-decomp rcondest make-rotation spline
312 kernel-dens kernel-smooth
313 fft make-sweep-matrix sweep-operator ax+y eigen
315 check-real ;; for optimize
317 covariance-matrix matrix print-matrix solve
318 backsolve eigenvalues eigenvectors accumulate cumsum combine
319 lowess))
326 (defpackage :lisp-stat-data
327 (:documentation "Data management, integration, I/O, and other data technologies.")
328 (:nicknames :ls-data)
329 (:use :common-lisp
330 :lisp-stat-object-system
331 :lisp-stat-config
332 :lisp-stat-types
333 :lisp-stat-compound-data)
334 (:shadowing-import-from :lisp-stat-object-system
335 call-method call-next-method)
336 (:export
337 ;; generic structures
338 ;; Variables
339 empirical-statistical-variable
340 modelbased-statistical-variable
341 categorical-statistical-variable
342 nominal-statistical-variable
343 ordinal-statistical-variable
344 continuous-statistical-variable
346 ordering factor-levels nobs support pdmf draw
347 print-object
349 ;; Observations
350 statistical-observation
351 measurement-types record
352 ;; XLS compat tools
353 open-file-dialog read-data-file read-data-columns load-data
354 load-example *variables* *ask-on-redefine*
355 def variables savevar undef))
357 (defpackage :lisp-stat-descriptive-statistics
358 (:use :common-lisp
359 :lisp-matrix
360 :lisp-stat-data
361 :lisp-stat-math
362 :lisp-stat-compound-data
363 :lisp-stat-basics)
364 (:shadowing-import-from :lisp-stat-math ;; life is a vector!
365 expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan
366 asin acos atan sinh cosh tanh asinh acosh atanh float random
367 truncate floor ceiling round minusp zerop plusp evenp oddp
368 < <= = /= >= > ;; complex
369 conjugate realpart imagpart phase
370 min max logand logior logxor lognot ffloor fceiling
371 ftruncate fround signum cis)
372 (:export mean standard-deviation variance
373 quantile median interquartile-range
374 fivnum sample))
376 (defpackage :lisp-stat-regression-linear
377 (:use :common-lisp
378 :lisp-matrix
379 :lisp-stat-basics
380 :lisp-stat-compound-data
381 :lisp-stat-descriptive-statistics )
382 (:shadowing-import-from :lisp-stat-object-system
383 call-method call-next-method)
384 (:export regression-model fit-model
386 estimates covariance-matrix
387 ;; functions for helpers
388 lm xtxinv
389 print-object ;; for method dispatch
392 (defpackage :common-lisp-statistics
393 (:documentation "Experimentation package for LispStat. Serious work
394 should be packaged up as a separate but similar package to help
395 drive reproducibility. By this I mean, creating a
396 data/analytics/analysis package with the minimal set of
397 objects/packages required.")
398 (:nicknames :cls :common-lisp-statistics :lisp-stat)
399 (:use :common-lisp
401 ;; extern packages
402 :xarray ;; generic reference -- internally supporting array, lol structs
403 :listoflist
404 :lisp-matrix ;; conversion to a more robust linalg approach
406 ;; intern packages
407 :lisp-stat-config
408 :lisp-stat-object-system
409 :lisp-stat-compound-data
410 :lisp-stat-probability
411 :lisp-stat-types
412 :lisp-stat-float
413 :lisp-stat-basics
414 :lisp-stat-data
416 :cls-data
417 :cls-dataframe
418 :cls-dataio
419 :cls-datatrans
421 :lisp-stat-math
422 :lisp-stat-descriptive-statistics
423 :lisp-stat-regression-linear
424 :cls-visualize
425 ;; :cls-visualize-plplot
426 ;; :cls-visualize-cl2d
428 (:shadowing-import-from :xarray slice)
429 (:shadowing-import-from :lisp-stat-object-system
430 call-method call-next-method)
431 (:shadowing-import-from :lisp-stat-math
432 expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan
433 asin acos atan sinh cosh tanh asinh acosh atanh float random
434 truncate floor ceiling round minusp zerop plusp evenp oddp
435 < <= = /= >= >
436 ;;complex
437 conjugate realpart imagpart phase
439 min max
440 logand logior logxor lognot
441 ffloor fceiling ftruncate fround
442 signum cis)
443 (:export
444 ;; lisp-stat-config:
445 *default-path* *lsos-files* *basic-files* *ls-files*
446 *cls-home-dir* *cls-data-dir* *cls-examples-dir*
448 ;; lsobjects :
449 defproto defproto2
450 defmeth send proto-slot-value
452 ;; lstypes :
453 fixnump check-nonneg-fixnum check-one-fixnum
454 check-one-nonneg-fixnum
455 check-one-real check-one-number
457 ;; lsmacros:
459 ;; lsfloat :
460 machine-epsilon
462 ;; compound :
463 compound-data-p *compound-data-proto* compound-object-p
464 compound-data-seq compound-data-length
465 element-list element-seq
466 sort-data order rank
467 recursive-map-elements map-elements
468 repeat
469 check-sequence
470 get-next-element make-next-element set-next-element
471 ;; sequencep
472 iseq
473 ordered-nneg-seq
474 select which
475 difference rseq
477 ;; lsmath.lsp
478 ^ ** expt + - * / mod rem pmin pmax abs 1+ 1- log exp sqrt sin cos
479 tan asin acos atan sinh cosh tanh asinh acosh atanh float random
480 truncate floor ceiling round minusp zerop plusp evenp oddp < <= =
481 /= >= > ;; complex
482 conjugate realpart imagpart phase min max
483 logand logior logxor lognot ffloor fceiling ftruncate fround
484 signum cis
486 #| ;; The following need to be re-found in lisp-matrix...
488 ;; matrices.lisp
489 matrixp num-rows num-cols matmult identity-matrix diagonal row-list
490 column-list inner-product outer-product cross-product transpose
491 bind-columns bind-rows
493 ;; linalg.lisp
494 chol-decomp lu-decomp lu-solve determinant inverse
495 sv-decomp qr-decomp rcondest make-rotation spline
496 kernel-dens kernel-smooth
497 fft make-sweep-matrix sweep-operator ax+y eigen
498 check-real
499 covariance-matrix matrix print-matrix solve
500 backsolve eigenvalues eigenvectors accumulate cumsum combine
501 lowess
503 ;; in linalg.lisp, possibly not supported by matlisp
504 spline kernel-dens kernel-smooth
508 ;; optimize.lsp
509 newtonmax nelmeadmax
511 ;; package LISPSTAT-MACROS
512 make-rv-function make-rv-function-1
514 ;; package XARRAY
515 xref xtype xdims xdim xdims*
517 ;; package LISTOFLIST
518 sublists-of-same-size-p equal-listoflist transpose-listoflist
520 ;; package DATA
521 ;; need to take this list and make it symbols... specs could mean
522 ;; that we process the strings in different ways? Create such a
523 ;; macro to enable export within this package?
525 (let ((lst ()))
526 (unlist
527 (mapc #'symbol-for-symbol-to-string-or-symbol
528 (do-external-symbols (s (find-package 'lisp-stat-data) lst) (push s lst))))
529 lst)
531 open-file-dialog read-data-file read-data-columns load-data
532 load-example *variables* *ask-on-redefine*
533 def variables savevar undef
534 ;; dataframe
535 dataframe-like dataframe-array make-dataframe
536 varlabels caselabels nrows ncols
537 dataframe-dimension dataframe-dimensons
538 dfref dfref-case dfref-var
539 consistent-dataframe-p
540 dataset list-of-columns list-of-rows
541 make-labels
543 ;; listoflist
544 listoflist->dataframe listoflist->array listoflist->matrix-like
545 sublists-of-same-size-p
547 ;; cls-dataio
548 dsvstream->dataframe dsvstream->matrix dsvstream->listoflist
549 filename.dsv->dataframe
551 ;; cls-datatrans
552 listoflist->dataframe dataframe->listoflist
553 listoflist->array array->listoflist
554 listoflist->matrix-like matrix-like->listoflist
557 ;; statistics.lsp (descriptions, should probably be moved
558 ;; later...?
559 standard-deviation quantile median interquartile-range
560 fivnum sample
562 ;; probability (dists.lisp)
563 log-gamma set-seed
564 uniform-rand normal-cdf normal-quant normal-dens
565 normal-rand bivnorm-cdf cauchy-cdf cauchy-quant cauchy-dens
566 cauchy-rand gamma-cdf gamma-quant gamma-dens gamma-rand
567 chisq-cdf chisq-quant chisq-dens chisq-rand beta-cdf beta-quant
568 beta-dens beta-rand t-cdf t-quant t-dens t-rand f-cdf f-quant
569 f-dens f-rand poisson-cdf poisson-quant poisson-pmf poisson-rand
570 binomial-cdf binomial-quant binomial-pmf binomial-rand
572 ;; Here is where we have a problem -- lispstat core should be core
573 ;; data management and config problems, with packages providing
574 ;; specialized extensions to LispStat, i.e. regression, nonlin
575 ;; regression, bayesian regression via laplace approximation, etc.
577 ;; The following could be considered "recommended packages",
578 ;; similar to the idea of the recommended packages in R. Probably
579 ;; we want them to do the exporting within that package, therefore
580 ;; NOT being able to lock the "data-ish" package, but only the
581 ;; subpackages prior to export.
583 ;; regression.lsp
584 ;; -- linear regressin models.
585 regression-model fit-model
586 estimates covariance-matrix
588 regression-model-proto x y intercept sweep-matrix
589 basis weights included total-sum-of-squares residual-sum-of-squares
590 predictor-names response-name case-labels
591 lm xtxinv
593 ;; nonlin.lsp
594 ;; -- nonlinear regression models
595 nreg-model nreg-model-proto mean-function theta-hat epsilon
596 count-limit verbose
597 ;; we might need something like xtxinv here? But should be
598 ;; encapsulated, so we use the one in regression.lisp
600 ;; bayes.lsp
601 bayes-model bayes-model-proto bayes-internals
603 ;; plots.lisp
604 plot-ex
605 contour-plot-ex
606 fn-contour-plot-ex
607 shade-plot-ex
608 3D-plot-ex
613 ;;;; PACKAGES FOR USEABILITY
615 (defpackage :lisp-stat-data-examples
616 (:documentation "Example data for unittests, examples, illustrations,")
617 (:use :common-lisp
618 :common-lisp-statistics)
619 (:shadowing-import-from :lisp-stat
620 call-method call-next-method
622 expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan
623 asin acos atan sinh cosh tanh asinh acosh atanh float random
624 truncate floor ceiling round minusp zerop plusp evenp oddp
625 < <= = /= >= > > ;; complex
626 conjugate realpart imagpart phase
627 min max logand logior logxor lognot ffloor fceiling
628 ftruncate fround signum cis
630 <= float imagpart)
631 (:export iron aluminum absorbtion
632 diabetes dlabs))
635 (defpackage :lisp-stat-user
636 (:documentation "Experimentation package for LispStat. Serious work
637 should be placed in a similar package elsewhere for
638 reproducibility. But this should hint as to what needs to be done
639 for a user- or analysis-package.")
640 (:nicknames :ls-user :cls-user)
641 (:use :common-lisp ; always needed for user playgrounds!
642 :lisp-matrix
643 :common-lisp-statistics
644 :lisp-stat-data-examples) ;; this last is to have 'things to play with'
645 (:shadowing-import-from :lisp-stat
646 call-method call-next-method
648 expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan
649 asin acos atan sinh cosh tanh asinh acosh atanh float random
650 truncate floor ceiling round minusp zerop plusp evenp oddp
651 < <= = /= >= > > ;; complex
652 conjugate realpart imagpart phase
653 min max logand logior logxor lognot ffloor fceiling
654 ftruncate fround signum cis
656 <= float imagpart))
658 (defpackage :lisp-stat-unittests
659 (:use :common-lisp
660 :lift :lisp-matrix
661 :lisp-stat :lisp-stat-data-examples)
662 (:shadowing-import-from :lisp-stat
663 call-method call-next-method ;; objects
664 expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan ;; lsmath
665 asin acos atan sinh cosh tanh asinh acosh atanh float random
666 truncate floor ceiling round minusp zerop plusp evenp oddp
667 < <= = /= >= > ;; complex
668 conjugate realpart imagpart phase
669 min max logand logior logxor lognot ffloor fceiling
670 ftruncate fround signum cis)
671 (:export run-lisp-stat-tests run-lisp-stat-test scoreboard ; exec
672 almost= almost=lists numerical=)) ; compare
674 (defpackage :cls-dataframe-example
675 (:use :common-lisp
676 :lift :lisp-stat-unittests
677 :lisp-stat-data-examples
678 :cls-dataframe)
679 (:export absorbtion aluminum iron))
682 (defpackage :lisp-stat-optimize
683 (:use :common-lisp
684 :cffi
685 :lisp-matrix
686 :lisp-stat-ffi-int
687 :lisp-stat-object-system
688 :lisp-stat-types
689 :lisp-stat-compound-data
690 :lisp-stat-math
691 :lisp-stat-float
692 :lisp-stat-basics
694 :lisp-stat-matrix
695 :lisp-stat-linalg-data
696 :lisp-stat-linalg
699 (:shadowing-import-from :lisp-stat-object-system
700 call-method call-next-method)
701 (:shadowing-import-from :lisp-stat-math
702 expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan
703 asin acos atan sinh cosh tanh asinh acosh atanh float random
704 truncate floor ceiling round minusp zerop plusp evenp oddp
705 < <= = /= >= > complex conjugate realpart imagpart phase
706 min max logand logior logxor lognot ffloor fceiling
707 ftruncate fround signum cis)
708 (:export
709 ;; derivatives
710 numgrad numhess
712 ;; optimization
713 newtonmax nelmeadmax))