FFT Documentation
-----------------

[ NOTE by Maarten van den Hoek
  I stripped of the actual FFT and IFFT programs, because they
  are build in the HP48GX. The utilities delivered with this
  program are still quite usefull!
]

By John Paul Morrison

This is an FFT program written mostly in RPL. I've included some support
programs that will help analysis of signals etc.
The original algorithm and code (VFFT) was written by Nicola Catacchio. Her
code was the fastest user code I have seen, so that's why I recoded it in
RPL. This new FFT code is 1.7 time faster for complex vectors, and 1.5 times
faster for real vectors, than the original VFFT program, and at least twice
as fast as others.

some sample times:
128 element (complex)   64 element (complex)
RPL FFT: 49 s           RPL FFT: 20 s
VFFT:    84 s           VFFT:    35 s
others: 100 s           others:  41 s

RPL code is often around 10 times faster than user code, but
unfortunately, the bottle-neck here is with the RPL complex multiply,
and less significantly with other complex operations. The HP routine
for a complex multiply is done in RPL, not machine code (ie they call
the rpl multiply, which is in machine code).
To get some more performance, I recoded the complex mulitplies, since
the built in complex multiply uses extended precision arithmetic.
Standard precision is faster, and the error is not significant (since
the FFT algorithm doesn't compund errors the way other algorithms do).

Here are the brief descriptions:
FFT       This takes a real or complex vector. If the dimensions are not
          2^N it will give an error message.
IFFT      Inverts the FFT.
SAMPLE    'algebraic'
          'name'
	  start
	  finish
	  n
	  This returns n samples in a vector. It samples the 'algebraic'
	  with independent variable 'name' from times start to finish.
PLOT      Useful for time domain plots.
          Does a bar-plot of a vector V(1...N). V(1) is plotted on the left,
	  and V(N) is on the right.
PLOTF     Useful for frequency domain plots. Does a bar-plot of a vector
          V(1...N). V(1) is in the center, plotted up to V(N/2) on the
	  right. V(N/2+1)..V(N). are on the left.
CLR       Clears the pict, and statistics information etc.
SINC
RECT
TRI       Defines some familiar communications signals.
LIN       LIN(t,t1,f1,t2,f2)
          This defines a straight line from (t1,f1) to (t2,f2) within the
	  range t1...t2; with zero otherwise. This is useful for defining
	  discontinuous functions with lots of straight lines in it.
