OK to move bind-fpprec from nummod.lisp to mutils.lisp?
Subject: OK to move bind-fpprec from nummod.lisp to mutils.lisp?
From: Raymond Toy
Date: Tue, 22 May 2012 08:58:23 -0700
On Tue, May 22, 2012 at 6:29 AM, Barton Willis <willisb at unk.edu> wrote:
> Would it be OK to move the bind-fpprec macro from nummod.lisp to
> mutils.lisp? My code for the generalized Lambert functions uses
> bind-fpprec, and I think bfloat-lambert-w-k function should use it
> too.
>
Don't see why you couldn't do that. Maybe even move it to one of the
files/modules in src/maxima.system like utility-macros or other-macros?
>
> My code for the generalized Lambert function needs to match
> a number to x * log(x). An explicit match is straightforward, but it
> also needs to match log(4/9)/3 to (2/3) * log(2/3), for example. How to do
> this?
> First, it uses floating point and rat to convert to a putative match;
> second it does an exact check of the putative match using radcan. Maybe
> you
> all know an elegant way to do this?
>
>
How about trying to find the factors of 4 and 9 and pulling out any
repeated factors from the log?
Ray