.TH LIBIEEE 3carl CARL
.SH NAME
libieee - standard ieee digital signal processing subroutines
.SH SYNOPSIS
.nf
.B #include <math.h>
.PP
.B double fourea_(x,&N,&isign)
.IP
.B 	float x[2*N];
.B 	int N, isign;
.PP
.B double fast_(x,&N)
.IP
.B 	float x[N+2];
.B 	int N;
.PP
.B double fsst_(x,&N)
.IP
.B 	float x[N+2];
.B 	int N;
.PP
.B double fft_(a,b,&one,&N,&one,&isign)
.IP
.B	float a[N], b[N];
.B	int N, isign, one = 1;
.PP
.B double auto_(&N,x,&M,a,&alpha,rc)
.IP
.B 	float x[N], a[M+1], rc[M], alpha;
.B 	int N, M;
.PP
.B double covar_(&N,x,&M,a,&alpha,grc)
.IP
.B 	float x[N], a[M+1], grc[M], alpha;
.B 	int N, M;
.SH DESCRIPTION
.PP
The following descriptions are necessarily too brief to be complete.  The
recommended source in all cases is 
.I Programs for Digital Signal Processing, 
I.E.E.E. Press, 1979.
.PP
.I fourea_
is primarily a demonstration of the FFT algorithm.  It takes the FFT of 
the N complex values in x (where x[0] is the first real value, and x[1]
is the first imaginary value, x[2] is the next real value, etc.).
.IP
INPUT: x contains the N complex values to be transformed; isign is -1
to specify a forward transform (time domain to frequency domain) and
+1 to specify an inverse transform (frequency domain to time domain);
N must be a power of 2.
.IP
OUTPUT: x contains the N complex values of the transform.
.IP
NOTE: Other FFT subroutines (listed below) are generally more appropriate.
.PP
.I fast_
and
.I  fsst_
are the most commonly used routines for taking forward
.I (fast_)
and inverse 
.I (fsst_)
FFT's for REAL input sequences.
.IP
INPUT: On input to
.I fast_,
x contains the N-point (real) sequence to be transformed; N must be a 
power of 2.
.IP
OUTPUT: On output from
.I fast_,
x contains the (N/2 + 1) complex values of the transform (where x[0] is the
DC value, x[1] is zero, x[2] is the next real value, x[3] is the next imaginary
value, etc.).  The remaining (N/2 - 1) complex values can be deduced from these
because the input is real.
.IP
INPUT:  On input to
.I fsst_,
x contains the (N/2 + 1) complex values of the transform; N must be a power
of 2.
.IP
OUTPUT:  On output from
.I fsst_,
x contains the N (real) values of the sequence.
.PP
.I fft_
is a mixed radix FFT; this means that fairly efficient transforms can be
performed for arbitrary values of N (i.e., N need not be a power of 2).
.IP
INPUT:	a holds the real components of the data to be transformed, and b
holds the imaginary components.  N is the number of samples in a; it is
also the size of the transform.  isign is -1 for a forward transform and
+1 for an inverse transform.  one is simply a variable equal to 1.
.IP
OUTPUT:	a holds the real components of the transform, and b holds the
imaginary components.
.PP
.I auto_
and
.I covar_
are the most commonly used routines for performing linear prediction analysis.
They each calculate the M weighting coefficients which allow x(n) to be best
estimated from its previous M values.  This is equivalent to calculating the
M coefficients of the IIR (allpole) filter which best fits the observed
spectrum of the sequence x(n).
.I auto_
implements the autocorrelation method of linear prediction. It treats the
data as though it is zero outside of the N values of x specified as input.
.I covar_
implements the covariance method of linear prediction.  It makes no
assumptions about the values of x beyond the N values specified as input.
If N >> M, the results of both methods are very similar.
.IP
INPUT: x contains the N-point sequence to be analyzed; M specifies
the number of coefficients to be used (up to a maximum of 20).
.IP
OUTPUT: The coefficients are contained in a[2] thru a[M+1] with
a[1] = 1. A set of related coefficients is returned in rc[1] thru rc[M] (for
.I auto_)
and in grc[1] thru grc[M] (for 
.I covar_).
alpha returns an indication of how well the data fit the linear
prediction model (A smaller alpha indicates better fit).  
.SH FILES
/usr/local/lib/libieee.
.SH AUTHORS
Extracted from Programs For Digital Signal Processing, edited by the
Digital Signal Procesing Committee, IEEE Acoustics, Speech, and Signal
Processing Society, IEEE Press, 1979.
.SH SEE ALSO
.I libcarl.
.SH DIAGNOSTICS
The most common error message is "floating exception (core dumped)" which
almost always indicates that bad values have been passed to the subroutine
being used.
