[PATCH] lisp ratio and bigfloat



I'm not sure I understand what problem this is supposed to solve.  In
general, Maxima expressions should not include Lisp rationals and
complexes, simply because much of the Maxima codebase was written without
them in mind, and may give incorrect results or errors when they are
encountered.  For example:

:lisp (setq $rr 3/5)
32^rr => error
integrate(x^rr,x) => error


True, there are many things that *do* work, but it is not a good idea to
count on it, as Maxima was written assuming that anything that is numberp
is either an integer or a float.

Are you planning to go through the whole Maxima codebase to make it
rational-safe?

         -s


On Fri, Sep 27, 2013 at 8:00 AM, John Lapeyre <lapeyre.math122a at gmail.com>wrote:

> Hi,
>
> It seems like there is a bit of support in maxima for
> lisp ratios, although not much. Here is a patch that
> allows ratios to work with bfloats in many instances.
> I tried to arrange it to have a low impact on efficiency.
> The patch passed the test suite.
>
> btw. In the original code, it looks like special constants are checked
> before integers (I'm not certain). I did not change this, but maybe
> it should be the other way around.
>
> --John
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>