"Simpler" bigfloat and complex bigfloat arithmetic



Barton Willis wrote:
> -----maxima-bounces at math.utexas.edu wrote: -----
>
>   
>> I think a long time ago, I talked with Barton about this, and have now
>> finally gotten a round to implementing it.
>>
>> I've written a set of CLOS classes to make working with bigfloat and
>> complex bigfloat numbers easier.  It's a new package "NUMERIC" where the
>> standard Lisp operations have been shadowed to work with a new bigfloat
>> and complex-bigfloat numbers.
>>     
>
>
> Great -- my version didn't use CLOS; I just had functions, such as fp+,
> that
> did complex float / bigfloat addition. I think I'll have a use for NUMERIC.
> I'd
> suggest starting a /contrib/numeric folder; eventually, I might have some
> extensions.
>
>
>   
Actually, I was hoping it might be suitable for putting in src.  Why? 
Take a look at gamma.lisp, and all of the routines Dieter had to write
for double-float, bigfloat, complex bigfloat, etc.  They all look pretty
much identical, except for the fact that he had to use different
operation names for each case. 

With NUMERIC (I open for a different package name), he could have just
used one routine to implement them all.  (I think.)  Yes, for speed, we
may have wanted a separate routine for double-floats, but that could
have waited until later when someone really needed the speed.   And the
current routines aren't particularly fast anyway.  No offense to
Dieter.  He just didn't declare any variable types to help the compiler
generate fast double-float code. :-)

Ray