"Simpler" bigfloat and complex bigfloat arithmetic
Subject: "Simpler" bigfloat and complex bigfloat arithmetic
From: R Fateman
Date: Fri, 02 Jan 2009 09:29:40 -0800
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