This is the num-utils Reference Manual, version 1.6.1, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 08 19:05:33 2024 GMT+0.
num-utils/num-utils.asd
num-utils/utilities.lisp
num-utils/arithmetic.lisp
num-utils/num=.lisp
num-utils/extended-real.lisp
num-utils/interval.lisp
num-utils/chebyshev.lisp
num-utils/polynomial.lisp
num-utils/elementwise.lisp
num-utils/print-matrix.lisp
num-utils/matrix.lisp
num-utils/matrix-shorthand.lisp
num-utils/quadrature.lisp
num-utils/rootfinding.lisp
num-utils/log-exp.lisp
num-utils/test-utilities.lisp
num-utils/pkgdcl.lisp
num-utils.utilities
num-utils.interval
num-utils.matrix-shorthand
num-utils.print-matrix
num-utils.polynomial
num-utils.arithmetic
num-utils.log-exp
num-utils.chebyshev
num-utils.rootfinding
num-utils.quadrature
num-utils.elementwise
num-utils.test-utilities
num-utils
num-utils.extended-real
num-utils.num=
num-utils.matrix
The main system appears first, followed by any subsystem dependency.
num-utils
Numerical utilities for Common Lisp
Numerical Utilities
Steven Nunez <steve@symbolics.tech>
(GIT https://github.com/Lisp-Stat/numerical-utilities.git)
MS-PL
This library implements simple numerical functions for Common Lisp, including
num=, a comparison operator for floats
simple arithmeric functions, like sum and l2norm
elementwise operations for arrays
intervals
special matrices and shorthand for their input
sample statistics
Chebyshev polynomials
univariate rootfinding
1.6.1
anaphora
(system).
alexandria
(system).
alexandria+
(system).
array-operations
(system).
select
(system).
let-plus
(system).
utilities.lisp
(file).
arithmetic.lisp
(file).
num=.lisp
(file).
extended-real.lisp
(file).
interval.lisp
(file).
chebyshev.lisp
(file).
polynomial.lisp
(file).
elementwise.lisp
(file).
print-matrix.lisp
(file).
matrix.lisp
(file).
matrix-shorthand.lisp
(file).
quadrature.lisp
(file).
rootfinding.lisp
(file).
log-exp.lisp
(file).
test-utilities.lisp
(file).
pkgdcl.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
num-utils/num-utils.asd
num-utils/utilities.lisp
num-utils/arithmetic.lisp
num-utils/num=.lisp
num-utils/extended-real.lisp
num-utils/interval.lisp
num-utils/chebyshev.lisp
num-utils/polynomial.lisp
num-utils/elementwise.lisp
num-utils/print-matrix.lisp
num-utils/matrix.lisp
num-utils/matrix-shorthand.lisp
num-utils/quadrature.lisp
num-utils/rootfinding.lisp
num-utils/log-exp.lisp
num-utils/test-utilities.lisp
num-utils/pkgdcl.lisp
num-utils/utilities.lisp
num-utils
(system).
as-alist
(generic function).
as-bit-vector
(function).
as-double-float
(function).
as-plist
(generic function).
as-simple-double-float-vector
(function).
as-simple-fixnum-vector
(function).
bic
(function).
binary-search
(function).
check-types
(macro).
curry*
(macro).
define-with-multiple-bindings
(macro).
expanding
(macro).
fixnum?
(function).
generate-sequence
(function).
gethash*
(macro).
make-vector
(compiler macro).
make-vector
(function).
simple-boolean-vector
(type).
simple-double-float-vector
(type).
simple-fixnum-vector
(type).
simple-single-float-vector
(type).
splice-awhen
(macro).
splice-when
(macro).
with-double-floats
(macro).
within?
(function).
boolean-sequence-p
(function).
boolean?
(function).
num-utils/arithmetic.lisp
utilities.lisp
(file).
num-utils
(system).
1c
(function).
abs-diff
(function).
absolute-square
(function).
as-integer
(function).
ceiling*
(function).
cube
(function).
cumulative-product
(function).
cumulative-sum
(function).
divides?
(function).
floor*
(function).
ivec
(function).
log10
(function).
log2
(function).
normalize-probabilities
(function).
numseq
(function).
product
(generic function).
round*
(function).
same-sign-p
(function).
seq-max
(function).
seq-min
(function).
square
(function).
sum
(generic function).
truncate*
(function).
define-rounding-with-offset
(macro).
ln
(function).
similar-element-type
(function).
similar-sequence-type
(function).
num-utils/num=.lisp
arithmetic.lisp
(file).
num-utils
(system).
*num=-tolerance*
(special variable).
define-num=-with-accessors
(macro).
define-structure-num=
(macro).
num-delta
(function).
num=
(generic function).
num=-function
(function).
num-utils/extended-real.lisp
num=.lisp
(file).
num-utils
(system).
<
(function).
<=
(function).
=
(function).
>
(function).
>=
(function).
extended-real
(type).
infinite?
(function).
lambda-template
(macro).
with-template
(macro).
define-comparison
(macro).
extend-pairwise-comparison
(function).
infinite
(type).
num-utils/interval.lisp
extended-real.lisp
(file).
num-utils
(system).
&interval
(macro).
extend-interval
(generic function).
extendf-interval
(macro).
finite-interval
(class).
grid-in
(function).
in-interval?
(function).
initialize-instance
(method).
interval
(function).
interval
(class).
interval-hull
(function).
interval-length
(function).
interval-midpoint
(function).
left
(generic function).
minusinf-interval
(class).
num=
(method).
num=
(method).
open-left?
(generic function).
open-right?
(generic function).
plusinf-interval
(class).
plusminus-interval
(function).
print-object
(method).
real-line
(class).
relative
(function).
relative
(structure).
right
(generic function).
shift-interval
(generic function).
shrink-interval
(function).
spacer
(function).
spacer
(structure).
split-interval
(function).
subintervals-in
(function).
copy-relative
(function).
copy-spacer
(function).
interval/finite-left
(class).
interval/finite-right
(class).
interval/infinite-left
(class).
interval/infinite-right
(class).
print-left-endpoint
(generic function).
print-right-endpoint
(generic function).
relative-fraction
(reader).
relative-p
(function).
spacer-p
(function).
spacer-weight
(reader).
num-utils/chebyshev.lisp
interval.lisp
(file).
num-utils
(system).
chebyshev-approximate
(function).
chebyshev-regression
(function).
chebyshev-root
(function).
chebyshev-roots
(function).
evaluate-chebyshev
(function).
ab-to-cd-intercept-slope
(function).
ab-to-cinf
(function).
chebyshev-approximate-implementation
(generic function).
chebyshev-recursion
(function).
cinf-to-ab
(function).
num-utils/polynomial.lisp
chebyshev.lisp
(file).
num-utils
(system).
evaluate-polynomial
(function).
evaluate-rational
(function).
num-utils/elementwise.lisp
polynomial.lisp
(file).
num-utils
(system).
e*
(function).
e+
(function).
e-
(function).
e/
(function).
e1-
(generic function).
e1/
(generic function).
e1log
(generic function).
e2*
(generic function).
e2+
(generic function).
e2-
(generic function).
e2/
(generic function).
e2<
(generic function).
e2<=
(generic function).
e2=
(generic function).
e2>
(generic function).
e2>=
(generic function).
e2log
(generic function).
eabs
(generic function).
eceiling
(generic function).
econjugate
(generic function).
ecos
(generic function).
eexp
(generic function).
eexpt
(generic function).
efloor
(generic function).
elementwise-float-contagion
(function).
elog
(function).
emax
(function).
emin
(function).
emod
(generic function).
ereduce
(generic function).
esin
(generic function).
esqrt
(generic function).
esquare
(generic function).
define-e&
(macro).
define-e1
(macro).
define-e2
(macro).
define-elementwise-reduction
(macro).
mapping-array
(macro).
num-utils/print-matrix.lisp
elementwise.lisp
(file).
num-utils
(system).
*print-matrix-precision*
(special variable).
print-length-truncate
(function).
print-matrix
(function).
print-matrix-formatter
(function).
num-utils/matrix.lisp
print-matrix.lisp
(file).
num-utils
(system).
as-array
(method).
as-array
(method).
as-array
(method).
as-array
(method).
diagonal-matrix
(function).
diagonal-matrix
(structure).
diagonal-matrix-elements
(reader).
(setf diagonal-matrix-elements)
(writer).
diagonal-vector
(generic function).
(setf diagonal-vector)
(generic function).
dims
(method).
dims
(method).
e1-
(method).
e1-
(method).
e1-
(method).
e1-
(method).
e1/
(method).
e1/
(method).
e1/
(method).
e1/
(method).
e1log
(method).
e1log
(method).
e1log
(method).
e1log
(method).
e2*
(method).
e2*
(method).
e2*
(method).
e2*
(method).
e2*
(method).
e2*
(method).
e2*
(method).
e2*
(method).
e2*
(method).
e2*
(method).
e2*
(method).
e2*
(method).
e2*
(method).
e2*
(method).
e2+
(method).
e2+
(method).
e2+
(method).
e2+
(method).
e2+
(method).
e2+
(method).
e2-
(method).
e2-
(method).
e2-
(method).
e2-
(method).
e2-
(method).
e2-
(method).
e2/
(method).
e2/
(method).
e2/
(method).
e2/
(method).
e2/
(method).
e2/
(method).
e2/
(method).
e2/
(method).
eexp
(method).
eexp
(method).
eexp
(method).
eexp
(method).
element-type
(method).
element-type
(method).
esqrt
(method).
esqrt
(method).
esqrt
(method).
esqrt
(method).
hermitian-matrix
(function).
hermitian-matrix
(structure).
lower-triangular-matrix
(function).
lower-triangular-matrix
(structure).
num=
(method).
num=
(method).
print-object
(method).
print-object
(method).
print-object
(method).
select
(method).
select
(method).
select
(method).
transpose
(generic function).
triangular-matrix
(type).
upper-triangular-matrix
(function).
upper-triangular-matrix
(structure).
wrapped-matrix
(structure).
wrapped-matrix-elements
(reader).
&diagonal-matrix
(macro).
&diagonal-matrix-r/o
(macro).
above-diagonal?
(function).
below-diagonal?
(function).
copy-diagonal-matrix
(function).
copy-hermitian-matrix
(function).
copy-lower-triangular-matrix
(function).
copy-upper-triangular-matrix
(function).
copy-wrapped-matrix
(function).
define-elementwise-as-array
(macro).
define-elementwise-same-class
(macro).
define-elementwise-univariate
(macro).
define-elementwise-with-constant
(macro).
define-wrapped-matrix
(macro).
diagonal-matrix-p
(function).
ensure-valid-elements
(function).
hermitian-matrix-elements
(function).
hermitian-matrix-p
(function).
lower-triangular-matrix-elements
(function).
lower-triangular-matrix-p
(function).
make-diagonal-matrix
(function).
make-hermitian-matrix
(function).
make-lower-triangular-matrix
(function).
make-upper-triangular-matrix
(function).
make-wrapped-matrix
(function).
upper-triangular-matrix-elements
(function).
upper-triangular-matrix-p
(function).
valid-sparse-type?
(function).
wrapped-matrix-p
(function).
zero-like
(function).
num-utils/matrix-shorthand.lisp
matrix.lisp
(file).
num-utils
(system).
diagonal-mx
(function).
hermitian-mx
(macro).
lower-triangular-mx
(macro).
mx
(macro).
upper-triangular-mx
(macro).
vec
(function).
pad-left-expansion
(function).
num-utils/quadrature.lisp
matrix-shorthand.lisp
(file).
num-utils
(system).
romberg-quadrature
(function).
copy-iterative-quadrature
(function).
copy-midpoint-quadrature
(function).
copy-richardson-extrapolation
(function).
copy-trapezoidal-quadrature
(function).
iterative-quadrature
(structure).
iterative-quadrature-a
(reader).
(setf iterative-quadrature-a)
(writer).
iterative-quadrature-b
(reader).
(setf iterative-quadrature-b)
(writer).
iterative-quadrature-f
(reader).
(setf iterative-quadrature-f)
(writer).
iterative-quadrature-h
(reader).
(setf iterative-quadrature-h)
(writer).
iterative-quadrature-n
(reader).
(setf iterative-quadrature-n)
(writer).
iterative-quadrature-p
(function).
iterative-quadrature-sum
(reader).
(setf iterative-quadrature-sum)
(writer).
make-iterative-quadrature
(function).
midpoint-quadrature
(function).
midpoint-quadrature
(structure).
midpoint-quadrature%
(function).
midpoint-quadrature-a
(function).
(setf midpoint-quadrature-a)
(function).
midpoint-quadrature-b
(function).
(setf midpoint-quadrature-b)
(function).
midpoint-quadrature-f
(function).
(setf midpoint-quadrature-f)
(function).
midpoint-quadrature-h
(function).
(setf midpoint-quadrature-h)
(function).
midpoint-quadrature-n
(function).
(setf midpoint-quadrature-n)
(function).
midpoint-quadrature-p
(function).
midpoint-quadrature-sum
(function).
(setf midpoint-quadrature-sum)
(function).
refine-quadrature
(generic function).
richardson-coefficient
(generic function).
richardson-extrapolation
(function).
richardson-extrapolation
(structure).
richardson-extrapolation-coefficient
(reader).
(setf richardson-extrapolation-coefficient)
(writer).
richardson-extrapolation-diagonal
(reader).
(setf richardson-extrapolation-diagonal)
(writer).
richardson-extrapolation-n
(reader).
(setf richardson-extrapolation-n)
(writer).
richardson-extrapolation-p
(function).
richardson-iteration
(function).
romberg-quadrature%
(function).
transformed-quadrature
(generic function).
trapezoidal-quadrature
(function).
trapezoidal-quadrature
(structure).
trapezoidal-quadrature%
(function).
trapezoidal-quadrature-a
(function).
(setf trapezoidal-quadrature-a)
(function).
trapezoidal-quadrature-b
(function).
(setf trapezoidal-quadrature-b)
(function).
trapezoidal-quadrature-f
(function).
(setf trapezoidal-quadrature-f)
(function).
trapezoidal-quadrature-h
(function).
(setf trapezoidal-quadrature-h)
(function).
trapezoidal-quadrature-n
(function).
(setf trapezoidal-quadrature-n)
(function).
trapezoidal-quadrature-p
(function).
trapezoidal-quadrature-sum
(function).
(setf trapezoidal-quadrature-sum)
(function).
num-utils/rootfinding.lisp
quadrature.lisp
(file).
num-utils
(system).
*rootfinding-delta-relative*
(special variable).
*rootfinding-epsilon*
(special variable).
root-bisection
(function).
narrow-bracket?
(function).
near-root?
(function).
opposite-sign?
(function).
rootfinding-delta
(function).
univariate-rootfinder-loop%
(macro).
num-utils/log-exp.lisp
rootfinding.lisp
(file).
num-utils
(system).
num-utils/test-utilities.lisp
log-exp.lisp
(file).
num-utils
(system).
compare-fns
(function).
compare-vectors
(function).
max-error
(reader).
(setf max-error)
(writer).
mean-error
(reader).
(setf mean-error)
(writer).
min-error
(reader).
(setf min-error)
(writer).
rms
(reader).
(setf rms)
(writer).
test-count
(reader).
(setf test-count)
(writer).
test-fn
(function).
test-results
(structure).
variance0
(reader).
(setf variance0)
(writer).
variance1
(reader).
(setf variance1)
(writer).
worst-case
(reader).
(setf worst-case)
(writer).
copy-test-results
(function).
make-test-results
(function).
test-results-p
(function).
num-utils/pkgdcl.lisp
test-utilities.lisp
(file).
num-utils
(system).
Packages are listed by definition order.
num-utils.utilities
num-utils.interval
num-utils.matrix-shorthand
num-utils.print-matrix
num-utils.polynomial
num-utils.arithmetic
num-utils.log-exp
num-utils.chebyshev
num-utils.rootfinding
num-utils.quadrature
num-utils.elementwise
num-utils.test-utilities
num-utils
num-utils.extended-real
num-utils.num=
num-utils.matrix
num-utils.utilities
A collection of utilities to work with floating point values. Optimised for double-float.
alexandria
.
anaphora
.
common-lisp
.
let-plus
.
as-alist
(generic function).
as-bit-vector
(function).
as-double-float
(function).
as-plist
(generic function).
as-simple-double-float-vector
(function).
as-simple-fixnum-vector
(function).
bic
(function).
binary-search
(function).
check-types
(macro).
curry*
(macro).
define-with-multiple-bindings
(macro).
expanding
(macro).
fixnum?
(function).
generate-sequence
(function).
gethash*
(macro).
make-vector
(compiler macro).
make-vector
(function).
simple-boolean-vector
(type).
simple-double-float-vector
(type).
simple-fixnum-vector
(type).
simple-single-float-vector
(type).
splice-awhen
(macro).
splice-when
(macro).
with-double-floats
(macro).
within?
(function).
boolean-sequence-p
(function).
boolean?
(function).
num-utils.interval
alexandria
.
anaphora
.
common-lisp
.
let-plus
.
num-utils.num=
.
num-utils.utilities
.
&interval
(macro).
extend-interval
(generic function).
extendf-interval
(macro).
finite-interval
(class).
grid-in
(function).
in-interval?
(function).
interval
(function).
interval
(class).
interval-hull
(function).
interval-length
(function).
interval-midpoint
(function).
left
(generic function).
minusinf-interval
(class).
open-left?
(generic function).
open-right?
(generic function).
plusinf-interval
(class).
plusminus-interval
(function).
real-line
(class).
relative
(function).
relative
(structure).
right
(generic function).
shift-interval
(generic function).
shrink-interval
(function).
spacer
(function).
spacer
(structure).
split-interval
(function).
subintervals-in
(function).
copy-relative
(function).
copy-spacer
(function).
interval/finite-left
(class).
interval/finite-right
(class).
interval/infinite-left
(class).
interval/infinite-right
(class).
print-left-endpoint
(generic function).
print-right-endpoint
(generic function).
relative-fraction
(reader).
relative-p
(function).
spacer-p
(function).
spacer-weight
(reader).
num-utils.matrix-shorthand
nu.mx
alexandria
.
anaphora
.
common-lisp
.
let-plus
.
num-utils.matrix
.
num-utils.utilities
.
diagonal-mx
(function).
hermitian-mx
(macro).
lower-triangular-mx
(macro).
mx
(macro).
upper-triangular-mx
(macro).
vec
(function).
pad-left-expansion
(function).
num-utils.print-matrix
alexandria
.
anaphora
.
common-lisp
.
let-plus
.
*print-matrix-precision*
(special variable).
print-length-truncate
(function).
print-matrix
(function).
print-matrix-formatter
(function).
num-utils.polynomial
Efficient evaluation of polynomial functions using Horner’s method
poly
alexandria
.
common-lisp
.
num-utils.utilities
.
evaluate-polynomial
(function).
evaluate-rational
(function).
num-utils.arithmetic
alexandria+
.
alexandria-2
.
anaphora
.
common-lisp
.
let-plus
.
num-utils.utilities
.
1c
(function).
abs-diff
(function).
absolute-square
(function).
as-integer
(function).
ceiling*
(function).
cube
(function).
cumulative-product
(function).
cumulative-sum
(function).
divides?
(function).
floor*
(function).
ivec
(function).
log10
(function).
log2
(function).
normalize-probabilities
(function).
numseq
(function).
product
(generic function).
round*
(function).
same-sign-p
(function).
seq-max
(function).
seq-min
(function).
square
(function).
sum
(generic function).
sum
(slot).
truncate*
(function).
define-rounding-with-offset
(macro).
ln
(function).
similar-element-type
(function).
similar-sequence-type
(function).
num-utils.chebyshev
alexandria
.
anaphora
.
common-lisp
.
let-plus
.
num-utils.interval
.
num-utils.utilities
.
chebyshev-approximate
(function).
chebyshev-regression
(function).
chebyshev-root
(function).
chebyshev-roots
(function).
evaluate-chebyshev
(function).
ab-to-cd-intercept-slope
(function).
ab-to-cinf
(function).
chebyshev-approximate-implementation
(generic function).
chebyshev-recursion
(function).
cinf-to-ab
(function).
num-utils.rootfinding
alexandria
.
common-lisp
.
let-plus
.
num-utils.interval
.
num-utils.utilities
.
*rootfinding-delta-relative*
(special variable).
*rootfinding-epsilon*
(special variable).
root-bisection
(function).
narrow-bracket?
(function).
near-root?
(function).
opposite-sign?
(function).
rootfinding-delta
(function).
univariate-rootfinder-loop%
(macro).
num-utils.quadrature
alexandria
.
alexandria+
.
anaphora
.
common-lisp
.
let-plus
.
num-utils.arithmetic
.
num-utils.interval
.
num-utils.utilities
.
romberg-quadrature
(function).
copy-iterative-quadrature
(function).
copy-midpoint-quadrature
(function).
copy-richardson-extrapolation
(function).
copy-trapezoidal-quadrature
(function).
iterative-quadrature
(structure).
iterative-quadrature-a
(reader).
(setf iterative-quadrature-a)
(writer).
iterative-quadrature-b
(reader).
(setf iterative-quadrature-b)
(writer).
iterative-quadrature-f
(reader).
(setf iterative-quadrature-f)
(writer).
iterative-quadrature-h
(reader).
(setf iterative-quadrature-h)
(writer).
iterative-quadrature-n
(reader).
(setf iterative-quadrature-n)
(writer).
iterative-quadrature-p
(function).
iterative-quadrature-sum
(reader).
(setf iterative-quadrature-sum)
(writer).
make-iterative-quadrature
(function).
midpoint-quadrature
(function).
midpoint-quadrature
(structure).
midpoint-quadrature%
(function).
midpoint-quadrature-a
(function).
(setf midpoint-quadrature-a)
(function).
midpoint-quadrature-b
(function).
(setf midpoint-quadrature-b)
(function).
midpoint-quadrature-f
(function).
(setf midpoint-quadrature-f)
(function).
midpoint-quadrature-h
(function).
(setf midpoint-quadrature-h)
(function).
midpoint-quadrature-n
(function).
(setf midpoint-quadrature-n)
(function).
midpoint-quadrature-p
(function).
midpoint-quadrature-sum
(function).
(setf midpoint-quadrature-sum)
(function).
refine-quadrature
(generic function).
richardson-coefficient
(generic function).
richardson-extrapolation
(function).
richardson-extrapolation
(structure).
richardson-extrapolation-coefficient
(reader).
(setf richardson-extrapolation-coefficient)
(writer).
richardson-extrapolation-diagonal
(reader).
(setf richardson-extrapolation-diagonal)
(writer).
richardson-extrapolation-n
(reader).
(setf richardson-extrapolation-n)
(writer).
richardson-extrapolation-p
(function).
richardson-iteration
(function).
romberg-quadrature%
(function).
transformed-quadrature
(generic function).
trapezoidal-quadrature
(function).
trapezoidal-quadrature
(structure).
trapezoidal-quadrature%
(function).
trapezoidal-quadrature-a
(function).
(setf trapezoidal-quadrature-a)
(function).
trapezoidal-quadrature-b
(function).
(setf trapezoidal-quadrature-b)
(function).
trapezoidal-quadrature-f
(function).
(setf trapezoidal-quadrature-f)
(function).
trapezoidal-quadrature-h
(function).
(setf trapezoidal-quadrature-h)
(function).
trapezoidal-quadrature-n
(function).
(setf trapezoidal-quadrature-n)
(function).
trapezoidal-quadrature-p
(function).
trapezoidal-quadrature-sum
(function).
(setf trapezoidal-quadrature-sum)
(function).
num-utils.elementwise
elmt
alexandria
.
common-lisp
.
let-plus
.
num-utils.arithmetic
.
num-utils.utilities
.
e*
(function).
e+
(function).
e-
(function).
e/
(function).
e1-
(generic function).
e1/
(generic function).
e1log
(generic function).
e2*
(generic function).
e2+
(generic function).
e2-
(generic function).
e2/
(generic function).
e2<
(generic function).
e2<=
(generic function).
e2=
(generic function).
e2>
(generic function).
e2>=
(generic function).
e2log
(generic function).
eabs
(generic function).
eceiling
(generic function).
econjugate
(generic function).
ecos
(generic function).
eexp
(generic function).
eexpt
(generic function).
efloor
(generic function).
elementwise-float-contagion
(function).
elog
(function).
emax
(function).
emin
(function).
emod
(generic function).
ereduce
(generic function).
esin
(generic function).
esqrt
(generic function).
esquare
(generic function).
define-e&
(macro).
define-e1
(macro).
define-e2
(macro).
define-elementwise-reduction
(macro).
mapping-array
(macro).
num-utils.test-utilities
common-lisp
.
compare-fns
(function).
compare-vectors
(function).
max-error
(reader).
(setf max-error)
(writer).
mean-error
(reader).
(setf mean-error)
(writer).
min-error
(reader).
(setf min-error)
(writer).
rms
(reader).
(setf rms)
(writer).
test-count
(reader).
(setf test-count)
(writer).
test-fn
(function).
test-results
(structure).
variance0
(reader).
(setf variance0)
(writer).
variance1
(reader).
(setf variance1)
(writer).
worst-case
(reader).
(setf worst-case)
(writer).
copy-test-results
(function).
make-test-results
(function).
test-results-p
(function).
num-utils
Numerical utilities for Lisp-Stat
nu
common-lisp
.
num-utils.arithmetic
.
num-utils.chebyshev
.
num-utils.elementwise
.
num-utils.interval
.
num-utils.log-exp
.
num-utils.matrix
.
num-utils.matrix-shorthand
.
num-utils.num=
.
num-utils.polynomial
.
num-utils.print-matrix
.
num-utils.quadrature
.
num-utils.rootfinding
.
num-utils.test-utilities
.
num-utils.utilities
.
num-utils.extended-real
xreal
alexandria
.
common-lisp
.
<
(function).
<=
(function).
=
(function).
>
(function).
>=
(function).
extended-real
(type).
infinite?
(function).
lambda-template
(macro).
with-template
(macro).
define-comparison
(macro).
extend-pairwise-comparison
(function).
infinite
(type).
num-utils.num=
alexandria
.
anaphora
.
common-lisp
.
let-plus
.
*num=-tolerance*
(special variable).
define-num=-with-accessors
(macro).
define-structure-num=
(macro).
num-delta
(function).
num=
(generic function).
num=-function
(function).
num-utils.matrix
alexandria
.
anaphora
.
common-lisp
.
let-plus
.
num-utils.elementwise
.
num-utils.num=
.
num-utils.print-matrix
.
num-utils.utilities
.
select
.
diagonal-matrix
(function).
diagonal-matrix
(structure).
diagonal-matrix-elements
(reader).
(setf diagonal-matrix-elements)
(writer).
diagonal-vector
(generic function).
(setf diagonal-vector)
(generic function).
hermitian-matrix
(function).
hermitian-matrix
(structure).
lower-triangular-matrix
(function).
lower-triangular-matrix
(structure).
transpose
(generic function).
triangular-matrix
(type).
upper-triangular-matrix
(function).
upper-triangular-matrix
(structure).
wrapped-matrix
(structure).
wrapped-matrix-elements
(reader).
&diagonal-matrix
(macro).
&diagonal-matrix-r/o
(macro).
above-diagonal?
(function).
below-diagonal?
(function).
copy-diagonal-matrix
(function).
copy-hermitian-matrix
(function).
copy-lower-triangular-matrix
(function).
copy-upper-triangular-matrix
(function).
copy-wrapped-matrix
(function).
define-elementwise-as-array
(macro).
define-elementwise-same-class
(macro).
define-elementwise-univariate
(macro).
define-elementwise-with-constant
(macro).
define-wrapped-matrix
(macro).
diagonal-matrix-p
(function).
ensure-valid-elements
(function).
hermitian-matrix-elements
(function).
hermitian-matrix-p
(function).
lower-triangular-matrix-elements
(function).
lower-triangular-matrix-p
(function).
make-diagonal-matrix
(function).
make-hermitian-matrix
(function).
make-lower-triangular-matrix
(function).
make-upper-triangular-matrix
(function).
make-wrapped-matrix
(function).
upper-triangular-matrix-elements
(function).
upper-triangular-matrix-p
(function).
valid-sparse-type?
(function).
wrapped-matrix-p
(function).
zero-like
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Default tolerance for NUM=.
Number of digits after the decimal point when printing numeric matrices.
Default relative interval width for rootfinding.
Default maximum for the absolute value of the function, used for rootfinding.
LET+ expansion for interval endpoints. If given a list of two values, the second value is an indicator for whether the endpoint is open.
CHECK-TYPE for multiple places of the same type. Each argument is either a place, or a list of places and a type-string.
Example: (check-types (a b) double-float)
Currying in all variables that are not *. Note that this is a macro, so * should not be quoted, and FUNCTION will be used as is, ie it can be a LAMBDA form.
Define a method for NUM=, specialized to the given class, comparing values obtained with accessors.
Define a NUM= method for the given structure, comparing the given slots.
Define a version of MACRO with multiple arguments, given as a list. Application of MACRO will be nested. The new name is the plural of the old one (generated using format by default).
Expand BODY. Useful for generating code programmatically.
Apply EXTEND-INTERVAL on PLACE using OBJECT.
Like GETHASH, but checking that KEY is present and raising the given error if not.
Create a lower triangular matrix. ROWS should be a list of lists, elements are evaluated. Masked elements (above the diagonal) are ignored at the expansion, rows which don’t have enough elements are padded with zeros.
LAMBDA with WITH-TEMPLATE in its BODY.
Create a lower triangular matrix. ROWS should be a list of lists, elements are evaluated. Masked elements (above the diagonal) are ignored at the expansion, rows which don’t have enough elements are padded with zeros.
Macro for creating a dense matrix (ie a rank 2 array). ROWS should be a list of lists (or atoms, which are treated as lists), elements are evaluated.
Similar to splice-when, but binds IT to test.
Similar to when, but wraps the result in list.
Example: ‘(,foo ,@(splice-when add-bar? bar))
Create an upper triangular matrix. ROWS should be a list of lists, elements are evaluated. Masked elements (below the diagonal) are ignored at the expansion.
For each binding = (variable value), coerce VALUE to DOUBLE-FLOAT and bind it to VARIABLE for BODY. When VALUE is omitted, VARIABLE is used instead. When BINDING is an atom, it is used for both the value and the variable.
Example:
(with-double-floats (a
(b)
(c 1))
...)
Define the function (PREFIX &rest VARIABLES) which can be used to match variables using :PLUSINF, :MINUSINF, REAL, or T.
Return 1-number. The mnemonic is "1 complement", 1- is already a CL library function.
Absolute difference of A and B.
Number multiplied by its complex conjugate.
Return a bit vector where each non-nil element of V is mapped to 1 and each NIL element is mapped to 0
Convert argument to DOUBLE-FLOAT.
If NUMBER represents an integer (as an integer, complex, or float, etc), return it as an integer, otherwise signal an error. Floats are converted with RATIONALIZE.
Convert SEQUENCE to a SIMPLE-DOUBLE-FLOAT-VECTOR. When COPY?, make sure they don’t share structure.
Convert SEQUENCE to a SIMPLE-FIXNUM-VECTOR. When COPY?, make sure that they don’t share structure.
Biconditional. Returns A <=> B.
Return INDEX such that
(WITHIN? (AREF SORTED-REALS INDEX) VALUE (AREF SORTED-REALS (1+ INDEX)).
SORTED-REALS is assumed to be reals sorted in ascending order (not checked, if this does not hold the result may be nonsensical, though the algorithm will terminate).
If value is below (or above) the first (last) break, NIL (T) is returned.
Find the lowest A=I*DIVISOR+OFFSET >= NUMBER, return (values A (- A NUMBER).
Return a closure approximating F on the given INTERVAL (may be infinite on either end) using the given number of Chebyshev polynomials.
Chebyshev polynomial regression using the given number of polynomials and points (zeroes of the corresponding Chebyshev polynomial).
Return the iTH root of the Mth Chebyshev polynomial as double-float.
Return the roots of the Mth Chebyshev polynomial as a vector of double-floats.
Compare the values returned by two functions
Compare two vectors containing the results of previous computations
Cube of number.
Cumulative product of sequence. Return a sequence of the same kind and length; last element is the total product. The latter is also returned as the second value.
Cumulative sum of sequence. Return a sequence of the same kind and length; last element is the total. The latter is returned as the second value.
Return a DIAGONAL-MATRIX with elements coerced to ELEMENT-TYPE.
Test if DIVISOR divides NUMBER without remainder, and if so, return the quotient. Works generally, but makes most sense for rationals.
Elementwise *.
Elementwise +.
Elementwise -.
Elementwise /.
Return the resulting float type when objects (or their elements) are combined using arithmetic operations.
Elementwise logarithm.
Elementwise MAX.
Elementwise MIN.
Return the sum of Chebyshev polynomials, weighted by COEFFICIENTS, at X.
Return the sum of polynomials, weighted by COEFFICIENTS, at X. COFFICIENTS are ordered from the highest degree down to the constant term. X must be of the same type as COEFFICIENTS.
Evaluate a rational function using Horner’s method. NUMERATOR and DENOMINATOR must be equal in size. These always have a loop and so may be less efficient than evaluating a pair of polynomials. However, there are some tricks we can use to prevent overflow that might otherwise occur in polynomial evaluation if z is large. This is important in our Lanczos code for example.
N.B. The order of coefficients for this function is NOT the same as evaluate-polynomial.
Compute (- (exp x) 1) stably even when X is near 0
Compute (/ (- (exp x) 1) x) stably even when X is near zero.
Compute (a^z)-1 stably even when A is close to 1 or Z is close to zero.
Check of type of OBJECT is fixnum.
Find the highest A=I*DIVISOR+OFFSET <= NUMBER, return (values A (- A NUMBER).
Like MAKE-SEQUENCE, but using a function to fill the result.
Example to create a sequence of random numbers between 0-1 from the uniform distribution:
(generate-sequence ’(vector double-float) 100 (lambda () (random 1.0))).
Essentially the initial values are ignored when using this function.
See also: aops:generate
Return an arithmetic sequence of the given size (length) between the endpoints of the interval. The endpoints of the sequence coincide with the respective endpoint of the interval iff it is closed. RESULT-TYPE determines the result type (eg list), if not given it is a simple-array (of rank 1), narrowing to the appropriate float type or fixnum if possible.
Create a lower-triangular-matrix.
Compute the hypotenuse of X and Y without danger of floating-point overflow or underflow.
Test if NUMBER is in INTERVAL (which can be NIL, designating the empty set).
Test if an object represents positive or negative infinity.
Create an INTERVAL.
Return the smallest connected interval that contains (elements in) OBJECT.
Difference between left and right.
Convex combination of left and right, with alpha (defaults to 0.5) weight on right.
Return a vector of fixnums.
(ivec end) => #(0 ... end-1) (or #(0 ... end+1) when end is negative).
(ivec start end) => #(start ... end-1) or to end+1 when end is negative.
When BY is given it determines the increment, adjusted to match the direction unless STRICT-DIRECTION, in which case an error is signalled.
Compute (log (1+ x)) stably even when X is near 0.
Compute (/ (log (+ 1 x)) x) stably even when X is near zero.
Accurately compute log(1+exp(x)) even when A is near zero.
Compute (log (- 1 x)) stably even when X is near zero.
Compute log(1-exp(x)) stably even when A is near zero.
This is sometimes known as the E_3, the third Einstein function.
See Mächler 2008 for notes on accurate calculation.
https://cran.r-project.org/web/packages/Rmpfr/vignettes/log1mexp-note.pdf
Abbreviation for decimal logarithm.
Compute (- (log (1+ x)) x)
Accuracy within ~2ulps for -0.227 < x < 0.315
Abbreviation for binary logarithm.
Compute log(2-exp(x)) stably even when X is near zero.
Compute log(exp(a)-1) stably even when A is small.
Create a lower-triangular-matrix.
Verify that each element of VECTOR is nonnegative and return a vector multiplied so that they sum to 1. ELEMENT-TYPE can be used to specify the element-type of the result. When RESULT is given, the result is placed there. When RESULT is NIL, VECTOR is modified instead.
|a-b|/max(1,|a|,|b|). Useful for comparing numbers.
Curried version of num=, with given tolerance.
Return a sequence between FROM and TO, progressing by BY, of the given LENGTH. Only 3 of these a parameters should be given, the missing one (NIL) should be inferred automatically. The sign of BY is adjusted if necessary. If TYPE is LIST, the result is a list, otherwise it determines the element type of the resulting simple array. If TYPE is nil, it as autodetected from the arguments (as a FIXNUM, a RATIONAL, or some subtype of FLOAT). Note that the implementation may upgrade the element type.
A symmetric interval around CENTER.
Return values (min dimension *print-length*) and whether the constraint is binding.
Format and print the elements of MATRIX (a 2d array) to STREAM, using PADDING between columns.
MASKED-FN is called on row and column indices. If it returns nil, the corresponding element is formatted using FORMATTER and printed. Otherwise, it should return a string, which is printed as is. INDENT is printed before each row.
If ALIGNED?, columns will be right-aligned. At most *PRINT-LENGTH* rows and columns are printed, more is indicated with ellipses (...).
Romberg quadrature of F on the interval. The iteration stops if the relative change is below EPSILON, but only after MIN-ITER refinements (to avoid spurious premature convergence). An error occurs when MAX-ITER iterations are reached without convergence.
Find the root of f bracketed between a and b using bisection.
The algorithm stops when either the root is bracketed in an interval of length
TOLERANCE (relative to the initial |a-b|), or root is found such that
abs(f(root)) <= epsilon.
Return five values: the root, the value of the function at the root, and a boolean which is true iff abs(f(root)) <= epsilon. If the third value is true, the fourth and fifth values are the endpoints of the bracketing interval, otherwise they are undefined.
Find A=I*DIVISOR+OFFSET that minimizes |A-NUMBER|, return (values A (- A NUMBER). When NUMBER is exactly in between two possible A’s, the rounding rule of ROUND is used on NUMBER-OFFSET.
Test whether all arguments have the same sign (ie all are positive, negative, or zero).
Return the maximum value in the sequence X
Return the minimum value in the sequence X
Shrink interval by given magnitudes (which may be REAL or RELATIVE). When check-flip?, the result is checked for endpoints being in a different order than the original. Negative LEFT and RIGHT extend the interval.
Return a vector of subintervals (same length as DIVISIONS), splitting the interval using the sequence DIVISIONS, which can be nonnegative real numbers (or RELATIVE specifications) and SPACERs which divide the leftover proportionally. If there are no spacers and the divisions don’t fill up the interval, and error is signalled.
Square of number.
Return INTERVAL evenly divided into COUNT subintervals as a vector. When MID-OPEN-RIGHT?, subintervals in the middle are open on the right and closed on the left, otherwise the opposite; openness of endpoints on the edge follows INTERVAL.
Test the differences between expected values and the given function
Find A=I*DIVISOR+OFFSET that maximizes |A|<=|NUMBER| with the same sign, return (values A (- A NUMBER).
Create a lower-triangular-matrix.
Return a vector with elements coerced to ELEMENT-TYPE.
Return non-nil iff value is in [left,right).
Return OBJECT as an ALIST. Semantics depends on OBJECT.
Return OBJECT as a PLIST. Semantics depends on OBJECT. The default method uses AS-ALIST.
Return the diagonal elements of MATRIX as a vector.
Set the diagonal elements of MATRIX using VECTOR.
array
)) ¶Univariate elementwise -.
diagonal-matrix
)) ¶hermitian-matrix
)) ¶upper-triangular-matrix
)) ¶lower-triangular-matrix
)) ¶number
)) ¶array
)) ¶Univariate elementwise /.
diagonal-matrix
)) ¶hermitian-matrix
)) ¶upper-triangular-matrix
)) ¶lower-triangular-matrix
)) ¶number
)) ¶array
)) ¶Univariate elementwise LOG.
diagonal-matrix
)) ¶hermitian-matrix
)) ¶upper-triangular-matrix
)) ¶lower-triangular-matrix
)) ¶number
)) ¶array
)) ¶Bivariate elementwise *.
diagonal-matrix
) (b diagonal-matrix
)) ¶hermitian-matrix
) (b hermitian-matrix
)) ¶upper-triangular-matrix
) (b upper-triangular-matrix
)) ¶lower-triangular-matrix
) (b lower-triangular-matrix
)) ¶number
) (b diagonal-matrix
)) ¶diagonal-matrix
) (b number
)) ¶number
) (b hermitian-matrix
)) ¶hermitian-matrix
) (b number
)) ¶number
) (b upper-triangular-matrix
)) ¶upper-triangular-matrix
) (b number
)) ¶number
) (b lower-triangular-matrix
)) ¶lower-triangular-matrix
) (b number
)) ¶wrapped-matrix
)) ¶wrapped-matrix
) b) ¶number
) (b number
)) ¶vector
) (b number
)) ¶number
) (b vector
)) ¶vector
) (b vector
)) ¶array
) (b number
)) ¶number
) (b array
)) ¶array
) (b array
)) ¶Bivariate elementwise +.
diagonal-matrix
) (b diagonal-matrix
)) ¶hermitian-matrix
) (b hermitian-matrix
)) ¶upper-triangular-matrix
) (b upper-triangular-matrix
)) ¶lower-triangular-matrix
) (b lower-triangular-matrix
)) ¶wrapped-matrix
)) ¶wrapped-matrix
) b) ¶number
) (b number
)) ¶vector
) (b number
)) ¶number
) (b vector
)) ¶vector
) (b vector
)) ¶array
) (b number
)) ¶number
) (b array
)) ¶array
) (b array
)) ¶Bivariate elementwise -.
diagonal-matrix
) (b diagonal-matrix
)) ¶hermitian-matrix
) (b hermitian-matrix
)) ¶upper-triangular-matrix
) (b upper-triangular-matrix
)) ¶lower-triangular-matrix
) (b lower-triangular-matrix
)) ¶wrapped-matrix
)) ¶wrapped-matrix
) b) ¶number
) (b number
)) ¶vector
) (b number
)) ¶number
) (b vector
)) ¶vector
) (b vector
)) ¶array
) (b number
)) ¶number
) (b array
)) ¶array
) (b array
)) ¶Bivariate elementwise /.
number
) (b diagonal-matrix
)) ¶diagonal-matrix
) (b number
)) ¶number
) (b hermitian-matrix
)) ¶hermitian-matrix
) (b number
)) ¶number
) (b upper-triangular-matrix
)) ¶upper-triangular-matrix
) (b number
)) ¶number
) (b lower-triangular-matrix
)) ¶lower-triangular-matrix
) (b number
)) ¶number
) (b number
)) ¶vector
) (b number
)) ¶number
) (b vector
)) ¶vector
) (b vector
)) ¶array
) (b number
)) ¶number
) (b array
)) ¶array
) (b array
)) ¶Bivariate elementwise <.
Bivariate elementwise <=.
Bivariate elementwise =.
Bivariate elementwise >.
Bivariate elementwise >=.
Bivariate elementwise LOG.
Univariate elementwise ABS.
Univariate elementwise CEILING.
Univariate elementwise CONJUGATE.
Univariate elementwise COS.
Univariate elementwise EXP.
diagonal-matrix
)) ¶hermitian-matrix
)) ¶upper-triangular-matrix
)) ¶lower-triangular-matrix
)) ¶number
)) ¶array
)) ¶Bivariate elementwise EXPT.
Univariate elementwise FLOOR.
Bivariate elementwise MOD.
Elementwise reduce, traversing in row-major order.
Univariate elementwise SIN.
Univariate elementwise SQRT.
diagonal-matrix
)) ¶hermitian-matrix
)) ¶upper-triangular-matrix
)) ¶lower-triangular-matrix
)) ¶number
)) ¶array
)) ¶Univariate elementwise SQUARE.
Return an interval that includes INTERVAL and OBJECT. NIL stands for the empty set.
Left endpoint of interval.
interval/infinite-left
)) ¶interval/finite-left
)) ¶automatically generated reader method
left
.
Compare A and B for approximate equality, checking corresponding elements when applicable (using TOLERANCE).
Two numbers A and B are NUM= iff |a-b|/max(1,|a|,|b|) <= tolerance.
Unless a method is defined for them, two objects are compared with EQUALP.
Generally, methods should be defined so that two objects are NUM= if they the same class, same dimensions, and all their elements are NUM=.
diagonal-matrix
) (b diagonal-matrix
) &optional tolerance) ¶wrapped-matrix
) (b wrapped-matrix
) &optional tolerance) ¶finite-interval
) (b finite-interval
) &optional tolerance) ¶number
) (b number
) &optional tolerance) ¶array
) (b array
) &optional tolerance) ¶cons
) (b cons
) &optional tolerance) ¶null
) (b null
) &optional tolerance) ¶True iff the left endpoint of the interval is open.
interval/infinite-left
)) ¶interval/finite-left
)) ¶automatically generated reader method
True iff the right endpoint of the interval is open.
interval/infinite-right
)) ¶interval/finite-right
)) ¶automatically generated reader method
Product of elements in object.
Right endpoint of interval.
interval/infinite-right
)) ¶interval/finite-right
)) ¶automatically generated reader method
finite-interval
) (offset real
)) ¶Sum of elements in object. KEY is applied to each element.
Transpose.
array
)) ¶lower-triangular-matrix
)) ¶upper-triangular-matrix
)) ¶hermitian-matrix
)) ¶diagonal-matrix
)) ¶lower-triangular-matrix
)) ¶array-operations/generic
.
diagonal-matrix
)) ¶array-operations/generic
.
hermitian-matrix
)) ¶array-operations/generic
.
upper-triangular-matrix
)) ¶array-operations/generic
.
wrapped-matrix
)) ¶array-operations/generic
.
diagonal-matrix
)) ¶array-operations/generic
.
wrapped-matrix
)) ¶array-operations/generic
.
diagonal-matrix
)) ¶array-operations/generic
.
finite-interval
) &key &allow-other-keys) ¶lower-triangular-matrix
) stream1) ¶hermitian-matrix
) stream1) ¶upper-triangular-matrix
) stream1) ¶lower-triangular-matrix
) &rest slices) ¶select
.
hermitian-matrix
) &rest slices) ¶select
.
upper-triangular-matrix
) &rest slices) ¶select
.
Diagonal matrix. The elements in the diagonal are stored in a vector.
structure-object
.
vector
Hermitian/symmetric matrix, with elements stored in the _lower_ triangle.
Implements _both_ real symmetric and complex Hermitian matrices — as technically, real symmetric matrices are also Hermitian. Complex symmetric matrices are _not_ implemented as a special matrix type, as they don’t have any special properties (eg real eigenvalues, etc).
Lower triangular matrix. ELEMENTS in the upper triangle are treated as zero.
Relative sizes are in terms of width.
structure-object
.
(real 0)
This slot is read-only.
Spacers divide the leftover portion of an interval.
structure-object
.
(real 0)
1
This slot is read-only.
Differences between reference values and computed values
structure-object
.
integer
0
double-float
0.0d0
double-float
0.0d0
double-float
0.0d0
integer
0
double-float
0.0d0
double-float
0.0d0
Upper triangular matrix. ELEMENTS in the lower triangle are treated as zero.
A matrix that has some special structure (eg triangular, symmetric/hermitian). ELEMENTS is always a matrix. Not used directly, not exported.
structure-object
.
(array * (* *))
This slot is read-only.
Interval with finite endpoints.
Abstract superclass for all intervals.
Interval from -∞ to RIGHT.
Interval from LEFT to ∞.
Representing the real line (-∞,∞).
num=
.
Extended real number.
Vector of BOOLEAN elements.
Simple vector of double-float elements.
Simple vector of fixnum elements.
Simple vector of single-float elements.
Triangular matrix (either lower or upper).
LET+ form for slots of the structure DIAGONAL-MATRIX.
LET+ form for slots of the structure DIAGONAL-MATRIX. Read-only.
Define a comparison, extendeding a pairwise comparison to an arbitrary number of arguments.
Define an univariate elementwise operation.
Define a bivariate elementwise operation.
Define binary elementwise operations for FUNCTION, implemented by converting them to arrays.
Define binary elementwise operations for FUNCTION for two arguments of the same class.
Define unary elementwise operations for FUNCTION for all subclasses of wrapped-elements.
Define binary elementwise operations for FUNCTION for all subclasses of wrapped-elements.
Common parts for univariate rootfinder functions.
Sets up the following:
- function OPPOSITE-SIGN-P for checking that two numbers are on the opposite side of 0
- function EVALUATE-AND-RETURN-IF-WITHIN-EPSILON which checks that |f(x)| <= EPSILON, if so, returns from the block with (VALUES X FX T), otherwise simply returns the value
- function RETURN-IF-WITHIN-TOLERANCE checks if the interval [A,B] bracketing X is small enough (smaller than TOLERANCE) and if so, returns (X FX NIL (INTERVAL A B))
- variables FA and FB to hold function values at A and B
Initially, it checks for either $f(a)$ or $f(b)$ being a root, and establishes $a leq b$ by exchanging $a,f(a)$ and $b,f(b)$ if necessary. Also checks that $f(a)$ and $f(b)$ are of opposite sign. Checks that both tolerance and epsilon are nonnegative.
Return (values INTERCEPT SLOPE) for linear mapping x:-> intercept+slope*x from [a,b] to [c,d].
Inverse of cinf-to-ab.
Test if element with indexes row and col is (strictly) above the diagonal.
Test if element with indexes row and col is (strictly) below the diagonal.
Check type of OBJECT is BOOLEAN.
Chebyshev polynomial recursion formula.
Map x in [c,plus-infinity) to z in [a,b] using x -> (x-c)/(1+x-c)+(b-a)+a.
Convert OBJECT to an array, check that it
1. has the required rank,
2. has a valid sparse element type, and
3. that it satisfies PREDICATES.
Return the array.
Extend TEST (a pairwise comparison) to an arbitrary number of arguments (but at least one, FIRST).
a
.
b
.
f
.
h
.
n
.
sum
.
Natural logarithm.
Return true iff $|a-b| < \delta$.
Return true iff $|f| < \epsilon$.
Return true iff A and B are on opposite sides of 0.
Pad ragged-right rows. Used internally to implement ragged right matrix specifications.
Standard formatter for matrix printing. Respects *print-precision*, and formats complex numbers as a+bi, eg 0.0+1.0i.
n
.
Add STEP (= $A(h q^{-k}$) to an existing Richardson EXTRAPOLATION. See the documentation of RICHARDSON-EXTRAPOLATION for details.
Internal function implementing Romberg quadrature. Requires an iterative quadrature instance, a relative EPSILON and MIN-ITER for the stopping criterion, and the maximum number of iterations allowed. Works on finite intervals.
Default DELTA for rootfinding methods, uses bracket width.
Return a type that is a supertype of ELEMENT-TYPE and is closed under arithmetic operations. May not be the narrowest.
Return type that sequence can be mapped to using arithmetic operations.
Check if TYPE is a valid type for sparse matrices. Only supertypes and subtypes of NUMBER are allowed.
Return 0 coerced to the element type of ARRAY. It is assumed that the latter satisfies VALID-SPARSE-TYPE?.
Implementation of CHEBYSHEV-APPROXIMATE.
plusinf-interval
) n-polynomials n-points) ¶finite-interval
) n-polynomials n-points) ¶interval/finite-left
) stream) ¶interval/infinite-left
) stream) ¶interval/finite-right
) stream) ¶interval/infinite-right
) stream) ¶Refine quadrature with more points. Return the sum for those points.
midpoint-quadrature
)) ¶trapezoidal-quadrature
)) ¶Return the coefficient $q$ for Richardson approximation.
midpoint-quadrature
)) ¶trapezoidal-quadrature
)) ¶Return a quadrature for integrating FUNCTION on INTERVAL, which may be infinite, in which case FUNCTION will be transformed. TRANSFORMATION can be used to select the transformation when applicable, otherwise it is NIL.
finite-interval
) (transformation null
)) ¶plusinf-interval
) (transformation null
)) ¶Quadrature building block.
F is the function.
A and B are the endpoints.
H is the stepsize.
structure-object
.
(function (double-float) double-float)
double-float
double-float
double-float
fixnum
0
double-float
0.0d0
Given A(h)=A_0 + sum_{k=1}^infty a_k h^{kp}, calculate approximations for A given A(h q^{-k}), where the latter can be incorporated using RICHARDSON-ITERATION with consecutive values for k=1,...,max_iter, which returns the latest A(0) as the first and the largest relative change, which can be used to test termination.
The algorithm uses Richardson extrapolation, the required coefficient is q^k.
Interval with left endpoint.
boolean
:open-left?
This slot is read-only.
Interval with right endpoint.
boolean
:open-right?
This slot is read-only.
Left endpoint is -∞.
Right endpoint is ∞.
Jump to: | &
(
1
<
=
>
A B C D E F G H I L M N O P R S T U V W Z |
---|
Jump to: | &
(
1
<
=
>
A B C D E F G H I L M N O P R S T U V W Z |
---|
Jump to: | *
A B C D E F H L M N O R S T V W |
---|
Jump to: | *
A B C D E F H L M N O R S T V W |
---|
Jump to: | A C D E F H I L M N P Q R S T U W |
---|
Jump to: | A C D E F H I L M N P Q R S T U W |
---|