Package bigfloat



Dieter Kaiser wrote:
> The problem is that after a call e.g. to the Maxima function $gamma we
> get a back a Maxima number. To continue the calculation we need the
> number with a type which is compatible to the calculation within the
> package bigfloat. This number should not be in general a bigfloat, but a
> float, CL complex, ... and a bigfloat type only for Maxima bigfloat
> number.
>
> I think such a function has to be added.
>
>   
Ok.  I understand now.  I think TO should do what you want and preserve
CL number types.  When it finds '((rat) a b) it should convert to a Lisp
rational, and '((bfloat) ...) should be a BIGFLOAT:REAL object.  If
maxima returns something like x+%i*y, TO should return a CL complex when
possible and then a BIGFLOAT:COMPLEX object.

To explicitly convert a CL number to a bigfloat, we'll have to use
(float x <some bigfloat number>) or (coerce x 'bigfloat:real)).

How does that sound?

Ray