[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Complex and double-precision numbers

This is what MRG, RLB and I have reached as a fairly firm method of
handling complex numbers:

Each complex cell will be composed of two words.  If the left half of the
word is zero, then the right half is a pointer to the component.  In order
for the generic functions to work, the component must be:

	A) Fixnum
	B) Flonum
	C) Double-precision
	D) Bignum

If the generic functions are not to be used on the complex number, then the
components may be anything.

If the left half of the word is non-zero, or in the special case of the
word being completely zero, then the component is considered a flonum and
is contained in the cell itself.

The first word is the real portion of the complex, and the second word is
the imaginary part.

This scheme satisfies the goals:

	A) Fast and effecient complex-flonum format for the IMSL package
	B) Reasonably fast/effecient arbitrary complex format for other uses.

Note that the notion of DUPLEX (double-precision complex) is no longer

For the compilation of these things, RLB and I will hack up a set of macros
that will convert the complex operations to operations on the real part and
the imaginary part.  This should allow NCOMPLR to produce reasonable code
using the pdl's in a normal fashion.  The goal of making IMSL work well
will be easilly satisfied by these macros.

The problem of double-precision numbers and compilation is still

I believe this sumarizes what we have talked about.  Comments are