[Maxima] "Simpler" bigfloat and complex bigfloat arithmetic

R Fateman fateman at cs.berkeley.edu
Fri Jan 2 11:29:40 CST 2009


An alternative design that I used in my generic arithmetic package 
(free/....) is to do the conversion this way:

  have the program that makes a number into a bigfloat called "to"
  have the program that makes a number into a quadfloat called "to"
  ...etc
 and have the packages make the difference.

e.g.  (generic:+    (bigfloat:to  3) (bigfloat:to 1/2))

With the right declarations for package usage you can eliminate some of 
the package
qualifications.

They are sort of equivalent to Ray's stuff if you consider

(defun numeric:bigfloat(x) (bigfloat:to x))

The actual work to figure out the equivalent number in a different form 
has to be done somewhere.

I'm all in favor of using CLOS, the common lisp object system, which 
didn't exist when
Maxima was written starting in 1966, or when bigfloats were written, 
circa 1974.
RJF





More information about the Maxima mailing list