There are 43 utilities.
 positivep v1.0

Check if
n
is positive. Provides
positivep
 negativep v1.0

Check if
n
is negative. Provides
negativep
 nonnegativep v1.0

Check if
n
is nonnegative. Provides
nonnegativep
 nonpositivep v1.0

Check if
n
is nonpositive. Provides
nonpositivep
 nonzerop v1.0

Check if
n
is nonzero. Provides
nonzerop
 digitcount v2.0

Compute the number of digits in the nonnegative integer
n
in basebase
. By default, the base is 10. Provides
digitcount
 rangeproduct v1.0

Compute
lower * (lower+1) * ... * (upper1) * upper
. Provides
rangeproduct
 factorial v1.0

Compute the factorial of
n
, wheren! = 1 * 2 * ... * n
. Provides
factorial
 Requires
 rangeproduct
 binomialcoefficient v1.0

Binomial coefficient of
n
andk
. Provides
binomialcoefficient
 Requires
 factorial, rangeproduct
 mulf v1.0

A modifying version of multiplication, similar to
incf
. Provides
mulf
 divf v1.0

A modifying version of division, similar to
decf
. Provides
divf
 half v1.0

Compute half of
x
. Provides
half
 double v1.0

Compute double
x
. Provides
double
 square v1.0

Compute the square of
x
. Provides
square
 cube v1.0

Compute the cube of
x
. Provides
cube
 digits v1.0

Return a list of the digits of the nonnegative integer
n
in basebase
. By default, decimal digits are returned.The order of the digits is such that the
k
th element of the list refers to the coefficient ofbase^k
. In other words, given the resulting list(c0 c1 c2 ... ck)
the following identity holds:
n = c0 + c1*base + c2*base^2 + ... + ck*base^k.
 Provides
digits
 nthdigit v1.0

Get the
n
th digit in a rational numbernumber
in basebase
. Ifn
is positive, it refers to digits to the left of the decimal point, and if negative, to the right. The digits of a negative number match that of its positive counterpart. Provides
nthdigit
 bitvectorinteger v1.0

Convert a bit vector
bv
to a positive integer. The bits of the integer are ordered from most significant to least significant, unlessleastsignificantfirst
is true. Provides
bitvectorinteger
 integerbitvector v1.0

Convert a positive integer
n
to a bit vector. The least significant bits will be first ifleastsignificantfirst
is true. Provides
integerbitvector
 primesbelow v1.0

Return a sorted list of all primes below an integer
n
.Examples:
(primesbelow 13) => (2 3 5 7 11) (primesbelow 1) => NIL
 Provides
primesbelow
 sec v1.0

Compute the secant of a number
z
. Provides
sec
 csc v1.0

Compute the cosecant of a number
z
. Provides
csc
 cot v1.0

Compute the cotangent of a number
z
. Provides
cot
 asec v1.0

Compute the arcsecant of a number
z
. Provides
asec
 acsc v1.0

Compute the arccosecant of a number
z
. Provides
acsc
 acot v1.0

Compute the arccotangent of a number
z
. Provides
acot
 imaginaryi v1.0

The imaginary number
i = sqrt(1)
. Provides
imaginaryi
,ii
 exponentiale v1.0

The exponential number
e = 2.71828...
. Provides
exponentiale
,ee
 mapcombinations v1.0

Calls
function
with each combination oflength
constructable from the elements of the subsequence ofsequence
delimited bystart
andend
.start
defaults to0
,end
to length ofsequence
, andlength
to the length of the delimited subsequence. (So unlesslength
is specified there is only a single combination, which has the same elements as the delimited subsequence.) Ifcopy
is true (the default) each combination is freshly allocated. Ifcopy
is false all combinations areeq
to each other, in which case consequences are specified if a combination is modified byfunction
. Provides
mapcombinations
 Requires
 ensurefunction
 mappermutations v1.0

Calls function with each permutation of
length
constructable from the subsequence ofsequence
delimited bystart
andend
.start
defaults to0
,end
to length of the sequence, andlength
to the length of the delimited subsequence. Provides
mappermutations
 Requires
 mapcombinations
 mapderangements v1.0

Calls
function
with each derangement of the subsequence ofsequence
denoted by the bounding index designatorsstart
andend
. Derangement is a permutation of the sequence where no element remains in place.sequence
is not modified, but individual derangements areeq
to each other. Consequences are unspecified if callingfunction
modifies either the derangement orsequence
. Provides
mapderangements
 extremum v1.0

Returns the element of
sequence
that would appear first if the subsequence bounded bystart
andend
was sorted usingpredicate
andkey
.extremum
determines the relationship between two elements ofsequence
by using thepredicate
function.predicate
should return true if and only if the first argument is strictly less than the second one (in some appropriate sense). Two argumentsx
andy
are considered to be equal if(funcall predicate x y)
and(funcall predicate y x)
are both false.The arguments to the
predicate
function are computed from elements ofsequence
using thekey
function, if supplied. Ifkey
is not supplied or isnil
, the sequence element itself is used.If
sequence
is empty,nil
is returned. Provides
extremum
 Requires
 ensurefunction
 clamp v1.0

Clamps the
number
into [min
,max
] range. Returnsmin
ifnumber
is lesser thenmin
andmax
ifnumber
is greater thenmax
, otherwise returnsnumber
. Provides
clamp
 gaussianrandom v1.0

Returns two gaussian random double floats as the primary and secondary value, optionally constrained by
min
andmax
. Gaussian random numbers form a standard normal distribution around0.0d0
.Sufficiently positive
min
or negativemax
will cause the algorithm used to take a very long time. Ifmin
is positive it should be close to zero, and similarly ifmax
is negative it should be close to zero. Provides
gaussianrandom
 lerp v1.0

Returns the result of linear interpolation between
a
andb
, using the interpolation coefficientv
. Provides
lerp
 mean v1.0

Returns the mean of
sample
.sample
must be a sequence of numbers. Provides
mean
 median v1.0

Returns median of
sample
.sample
must be a sequence of real numbers. Provides
median
 Requires
 copysequence
 variance v1.0

Variance of
sample
. Returns the biased variance ifbiased
is true (the default), and the unbiased estimator of variance ifbiased
is false.sample
must be a sequence of numbers. Provides
variance
 Requires
 mean
 standarddeviation v1.0

Standard deviation of
sample
. Returns the biased standard deviation ifbiased
is true (the default), and the square root of the unbiased estimator for variance ifbiased
is false (which is not the same as the unbiased estimator for standard deviation).sample
must be a sequence of numbers. Provides
standarddeviation
 Requires
 variance
 maxf v1.0

Modifymacro for
max
. Sets place designated by the first argument to the maximum of its original value andnumbers
. Provides
maxf
 minf v1.0

Modifymacro for
min
. Sets place designated by the first argument to the minimum of its original value andnumbers
. Provides
minf
 subfactorial v1.0

Subfactorial of the nonnegative integer
n
. Provides
subfactorial
 countpermutations v1.0

Number of
k
element permutations for a sequence ofn
objects.k
defaults ton
 Provides
countpermutations
 Requires
 rangeproduct