refactoring objects/functions in the data component.
[CommonLispStat.git] / src / packages.lisp
blob2fa591b98cc48094ca01ba743fe625b50f215fd0
1 ;;; -*- mode: lisp -*-
3 ;;; Time-stamp: <2009-12-23 14:41:54 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--2008, AJ Rossini. BSD, LLGPL, or GPLv2, depending
8 ;;; on how it arrives.
9 ;;; Purpose: package structure description for lispstat
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
400 :xarray ;; generic reference -- internally supporting array, lol structs
401 :listoflist
402 :lisp-matrix ;; conversion to a more robust linalg approach
403 :lisp-stat-config
404 :lisp-stat-object-system
405 :lisp-stat-compound-data
406 :lisp-stat-probability
407 :lisp-stat-types
408 :lisp-stat-float
409 :lisp-stat-basics
410 :lisp-stat-data
411 :cls-dataframe
412 :cls-data
413 :lisp-stat-math
414 :lisp-stat-descriptive-statistics
415 :lisp-stat-regression-linear
416 :cls-visualize
417 ;; :cybertiggyr-dsv
418 ;; :cls-visualize-plplot
420 (:shadowing-import-from :xarray slice)
421 (:shadowing-import-from :lisp-stat-object-system
422 call-method call-next-method)
423 (:shadowing-import-from :lisp-stat-math
424 expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan
425 asin acos atan sinh cosh tanh asinh acosh atanh float random
426 truncate floor ceiling round minusp zerop plusp evenp oddp
427 < <= = /= >= >
428 ;;complex
429 conjugate realpart imagpart phase
431 min max
432 logand logior logxor lognot
433 ffloor fceiling ftruncate fround
434 signum cis)
435 (:export
436 ;; lisp-stat-config:
437 *default-path* *lsos-files* *basic-files* *ls-files*
438 *cls-home-dir* *cls-data-dir* *cls-examples-dir*
440 ;; lsobjects :
441 defproto defproto2
442 defmeth send proto-slot-value
444 ;; lstypes :
445 fixnump check-nonneg-fixnum check-one-fixnum
446 check-one-nonneg-fixnum
447 check-one-real check-one-number
449 ;; lsmacros:
451 ;; lsfloat :
452 machine-epsilon
454 ;; compound :
455 compound-data-p *compound-data-proto* compound-object-p
456 compound-data-seq compound-data-length
457 element-list element-seq
458 sort-data order rank
459 recursive-map-elements map-elements
460 repeat
461 check-sequence
462 get-next-element make-next-element set-next-element
463 ;; sequencep
464 iseq
465 ordered-nneg-seq
466 select which
467 difference rseq
469 ;; lsmath.lsp
470 ^ ** expt + - * / mod rem pmin pmax abs 1+ 1- log exp sqrt sin cos
471 tan asin acos atan sinh cosh tanh asinh acosh atanh float random
472 truncate floor ceiling round minusp zerop plusp evenp oddp < <= =
473 /= >= > ;; complex
474 conjugate realpart imagpart phase min max
475 logand logior logxor lognot ffloor fceiling ftruncate fround
476 signum cis
478 #| ;; The following need to be re-found in lisp-matrix...
480 ;; matrices.lisp
481 matrixp num-rows num-cols matmult identity-matrix diagonal row-list
482 column-list inner-product outer-product cross-product transpose
483 bind-columns bind-rows
485 ;; linalg.lisp
486 chol-decomp lu-decomp lu-solve determinant inverse
487 sv-decomp qr-decomp rcondest make-rotation spline
488 kernel-dens kernel-smooth
489 fft make-sweep-matrix sweep-operator ax+y eigen
490 check-real
491 covariance-matrix matrix print-matrix solve
492 backsolve eigenvalues eigenvectors accumulate cumsum combine
493 lowess
495 ;; in linalg.lisp, possibly not supported by matlisp
496 spline kernel-dens kernel-smooth
500 ;; optimize.lsp
501 newtonmax nelmeadmax
503 ;; package LISPSTAT-MACROS
504 make-rv-function make-rv-function-1
506 ;; package XARRAY
507 xref xtype xdims xdim xdims*
509 ;; package LISTOFLIST
510 sublists-of-same-size-p equal-listoflist transpose-listoflist
512 ;; package DATA
513 ;; need to take this list and make it symbols... specs could mean
514 ;; that we process the strings in different ways? Create such a
515 ;; macro to enable export within this package?
517 (let ((lst ()))
518 (unlist
519 (mapc #'symbol-for-symbol-to-string-or-symbol
520 (do-external-symbols (s (find-package 'lisp-stat-data) lst) (push s lst))))
521 lst)
523 open-file-dialog read-data-file read-data-columns load-data
524 load-example *variables* *ask-on-redefine*
525 def variables savevar undef
526 ;; dataframe
527 dataframe-like dataframe-array make-dataframe
528 varlabels caselabels nrows ncols
529 dataframe-dimension dataframe-dimensons
530 dfref dfref-case dfref-var
531 consistent-dataframe-p
532 dataset list-of-columns list-of-rows
533 make-labels
535 ;; listoflist
536 listoflist->dataframe listoflist->array listoflist->matrix-like
537 sublists-of-same-size-p
539 ;; statistics.lsp (descriptions, should probably be moved
540 ;; later...?
541 standard-deviation quantile median interquartile-range
542 fivnum sample
544 ;; probability (dists.lisp)
545 log-gamma set-seed
546 uniform-rand normal-cdf normal-quant normal-dens
547 normal-rand bivnorm-cdf cauchy-cdf cauchy-quant cauchy-dens
548 cauchy-rand gamma-cdf gamma-quant gamma-dens gamma-rand
549 chisq-cdf chisq-quant chisq-dens chisq-rand beta-cdf beta-quant
550 beta-dens beta-rand t-cdf t-quant t-dens t-rand f-cdf f-quant
551 f-dens f-rand poisson-cdf poisson-quant poisson-pmf poisson-rand
552 binomial-cdf binomial-quant binomial-pmf binomial-rand
554 ;; Here is where we have a problem -- lispstat core should be core
555 ;; data management and config problems, with packages providing
556 ;; specialized extensions to LispStat, i.e. regression, nonlin
557 ;; regression, bayesian regression via laplace approximation, etc.
559 ;; The following could be considered "recommended packages",
560 ;; similar to the idea of the recommended packages in R. Probably
561 ;; we want them to do the exporting within that package, therefore
562 ;; NOT being able to lock the "data-ish" package, but only the
563 ;; subpackages prior to export.
565 ;; regression.lsp
566 ;; -- linear regressin models.
567 regression-model fit-model
568 estimates covariance-matrix
570 regression-model-proto x y intercept sweep-matrix
571 basis weights included total-sum-of-squares residual-sum-of-squares
572 predictor-names response-name case-labels
573 lm xtxinv
575 ;; nonlin.lsp
576 ;; -- nonlinear regression models
577 nreg-model nreg-model-proto mean-function theta-hat epsilon
578 count-limit verbose
579 ;; we might need something like xtxinv here? But should be
580 ;; encapsulated, so we use the one in regression.lisp
582 ;; bayes.lsp
583 bayes-model bayes-model-proto bayes-internals
585 ;; plots.lisp
586 plot-ex
587 contour-plot-ex
588 fn-contour-plot-ex
589 shade-plot-ex
590 3D-plot-ex
595 ;;;; PACKAGES FOR USEABILITY
597 (defpackage :lisp-stat-data-examples
598 (:documentation "Example data for unittests, examples, illustrations,")
599 (:use :common-lisp
600 :common-lisp-statistics)
601 (:shadowing-import-from :lisp-stat
602 call-method call-next-method
604 expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan
605 asin acos atan sinh cosh tanh asinh acosh atanh float random
606 truncate floor ceiling round minusp zerop plusp evenp oddp
607 < <= = /= >= > > ;; complex
608 conjugate realpart imagpart phase
609 min max logand logior logxor lognot ffloor fceiling
610 ftruncate fround signum cis
612 <= float imagpart)
613 (:export iron aluminum absorbtion
614 diabetes dlabs))
617 (defpackage :lisp-stat-user
618 (:documentation "Experimentation package for LispStat. Serious work
619 should be placed in a similar package elsewhere for
620 reproducibility. But this should hint as to what needs to be done
621 for a user- or analysis-package.")
622 (:nicknames :ls-user :cls-user)
623 (:use :common-lisp ; always needed for user playgrounds!
624 :lisp-matrix
625 :common-lisp-statistics
626 :lisp-stat-data-examples) ;; this last is to have 'things to play with'
627 (:shadowing-import-from :lisp-stat
628 call-method call-next-method
630 expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan
631 asin acos atan sinh cosh tanh asinh acosh atanh float random
632 truncate floor ceiling round minusp zerop plusp evenp oddp
633 < <= = /= >= > > ;; complex
634 conjugate realpart imagpart phase
635 min max logand logior logxor lognot ffloor fceiling
636 ftruncate fround signum cis
638 <= float imagpart))
640 (defpackage :lisp-stat-unittests
641 (:use :common-lisp
642 :lift :lisp-matrix
643 :lisp-stat :lisp-stat-data-examples)
644 (:shadowing-import-from :lisp-stat
645 call-method call-next-method ;; objects
646 expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan ;; lsmath
647 asin acos atan sinh cosh tanh asinh acosh atanh float random
648 truncate floor ceiling round minusp zerop plusp evenp oddp
649 < <= = /= >= > ;; complex
650 conjugate realpart imagpart phase
651 min max logand logior logxor lognot ffloor fceiling
652 ftruncate fround signum cis)
653 (:export run-lisp-stat-tests run-lisp-stat-test scoreboard ; exec
654 almost= almost=lists numerical=)) ; compare
656 (defpackage :cls-dataframe-example
657 (:use :common-lisp
658 :lift :lisp-stat-unittests
659 :lisp-stat-data-examples
660 :cls-dataframe)
661 (:export absorbtion aluminum iron))
664 (defpackage :lisp-stat-optimize
665 (:use :common-lisp
666 :cffi
667 :lisp-matrix
668 :lisp-stat-ffi-int
669 :lisp-stat-object-system
670 :lisp-stat-types
671 :lisp-stat-compound-data
672 :lisp-stat-math
673 :lisp-stat-float
674 :lisp-stat-basics
676 :lisp-stat-matrix
677 :lisp-stat-linalg-data
678 :lisp-stat-linalg
681 (:shadowing-import-from :lisp-stat-object-system
682 call-method call-next-method)
683 (:shadowing-import-from :lisp-stat-math
684 expt + - * / ** mod rem abs 1+ 1- log exp sqrt sin cos tan
685 asin acos atan sinh cosh tanh asinh acosh atanh float random
686 truncate floor ceiling round minusp zerop plusp evenp oddp
687 < <= = /= >= > complex conjugate realpart imagpart phase
688 min max logand logior logxor lognot ffloor fceiling
689 ftruncate fround signum cis)
690 (:export
691 ;; derivatives
692 numgrad numhess
694 ;; optimization
695 newtonmax nelmeadmax))