smarter factor-if-small function?



>> I have recently begun playing around with maxima for a probabilistic
>>  program evolution project that requires simplification of random
>>  expressions.
>
> Hmm, neat. I like hearing about stuff that people are working on with Maxima.
>
Thanks! The eventual goal is full program induction - given some
input-output pairs, find short & general programs that map inputs to
outputs. More info on the general approach can be found via
http://metacog.org/doc.html, if you're interested.

> Well, it looks like Maxima's method for factoring is very inefficient for
> fractional exponents. I really have no idea how to do it better.
> Is there some way to prove that there is no nontrivial factorization for
> some class of expressions? (Which includes stuff like -0.2 + x^0.70086.)
>
> Maybe there are better ways to approach the sign determination
> problem, but I'm not yet ready to give up factoring.
>
Hrm, after a bit of fiddling it appears that 0.70086 gets transformed
into the rational 7905 / 11279, and maxima then attempts to create a
7905 x 7905 array in the course of factoring. I note that this problem
also afflicts attempts to determine e.g.

is(equal(-0.2+x^.70086, 0));

is(-0.2+x^.70086 > 0);

etc.

Maybe there is a cheap trick to allow us to e.g. bound 7905 / 11279
between 7/10 and 8/10 (since x^ 7/10 and x^8/10 can be handled by
maxima with ease). For x>0 this would give us nice upper and lower
bounds.. Is there anyone here more conversant than I with the
properties of exponents that can see how this would work in general?

I am not sure what the general class of expression is that causes
maxima's factor algorithm to blow up (will have to examine the code) -
is it just rational exponents, or is it broader?

Cheers,
Moshe