Common Lisp Package: FLOATING-POINT

README:

FUNCTION

Public

ARITHMETIC-MEAN (DATA1 DATA2 &REST DATA)

Return the arithmetic mean of the data.

LINEAR-LEAST-SQUARES (DATA-X DATA-Y)

Return the slope, intercept, variance and r^2. 'Engineering Mathematics and Statistics' Cheremisinoff, pg. 126

MEAN-AND-STANDARD-DEVIATION (DATA1 DATA2 &REST DATA)

Return the arithmetic mean and sample standard deviation.

SAMPLE-STANDARD-DEVIATION (DATA1 DATA2 &REST DATA)

Return the sample standard deviation of the data.

STANDARD-DEVIATION (DATA1 DATA2 &REST DATA)

Return the standard deviation of the data.

Private

%FLOAT-EQUAL (DATA1 DATA2 EPSILON)

Return true if the relative error between the data is less than epsilon.

%NORM-EQUAL (SEQ1 SEQ2 EPSILON MEASURE)

Return true if the relative error norm is less than epsilon.

%NORMALIZE-FLOAT (SIGNIFICAND &OPTIONAL (EXPONENT 0))

Return the normalized floating point number and exponent.

%RELATIVE-ERROR (EXACT APPROXIMATE)

Return the relative error of the numbers.

%RELATIVE-ERROR-NORM (EXACT APPROXIMATE MEASURE)

Return the relative error norm of the sequences.

%SEQ-1-NORM (DATA)

Return the Taxicab norm of the sequence.

%SEQ-2-NORM (DATA)

Return the Euclidean norm of the sequence.

%SEQ-FLOAT-EQUAL (SEQ1 SEQ2 EPSILON)

Return true if the element-wise comparison of relative error is less than epsilon.

%SEQ-INF-NORM (DATA)

Return the infinity, or maximum, norm of the sequence.

%SEQ-NORM (DATA MEASURE)

Return the norm of the sequence according to the measure.

%SEQ-P-NORM (DATA P)

Return the p norm of the sequence.

%SEQ-SIGFIG-EQUAL (SEQ1 SEQ2 SIGNIFICANT-FIGURES)

Return true if the element-wise comparison is equal to the specified significant figures.

%SIGFIG-EQUAL (FLOAT1 FLOAT2 SIGNIFICANT-FIGURES)

Return true if the floating point numbers have equal significant figures.

GENERIC-FUNCTION

Public

DEFAULT-EPSILON (VALUE)

Return the default epsilon for the value.

FLOAT-EQUAL (DATA1 DATA2 &OPTIONAL EPSILON)

Return true if the floating point data is equal.

NORM-EQUAL (DATA1 DATA2 &OPTIONAL EPSILON MEASURE)

Return true if the norm of the data is equal.

RELATIVE-ERROR (EXACT APPROXIMATE)

Return the relative-error between the 2 quantities.

RELATIVE-ERROR-NORM (EXACT APPROXIMATE &OPTIONAL MEASURE)

Return the relative error norm

SIGFIG-EQUAL (DATA1 DATA2 &OPTIONAL SIGNIFICANT-FIGURES)

Return true if the data have equal significant figures.

Private

%NORM (DATA &OPTIONAL MEASURE)

Return the element-wise norm of the data.

%SUMP (DATA P)

Return the scaling parameter and the sum of the powers of p of the ~ data.

%SUMSQ (DATA)

Return the scaling parameter and the sum of the squares of the ~ data.

VARIABLE

Public

*EPSILON*

The default error epsilon.

*MEASURE*

The default measure of the norm.

*SIGNIFICANT-FIGURES*

The default number of significant figures.