endless CRE problems



On Thu, Jan 21, 2010 at 11:57 AM, Oliver Kullmann
<O.Kullmann at swansea.ac.uk>wrote:

> is there a possibility to completely turn off this internal CRE business?


What do you mean by the "turn off the internal CRE business"?

Surely you are not suggesting that Maxima stop using CRE's in general?

   expand((x1+x2+x3)^200)$                  -- using general representation
   Evaluation took 1.8600 seconds (1.8600 elapsed)
   rat((x1+x2+x3)^200)$                          -- using CRE representation
   Evaluation took 0.0300 seconds (0.0300 elapsed)


> It causes just a never-ending stream of problems. (Just remember the
> apparently forgotten gf-package, which is in its most important functions
> not working because of CRE-problems.)
>

Not sure about "never-ending stream", but yes, there are bugs where special
representations like CRE are not handled correctly.  There are also bugs
where bigfloats aren't handled correctly, etc. It's unfortunate that there
are bugs, but when we get proper bug reports, we try to fix them. Some
useful guidelines for writing good bug reports can be found in
http://www.chiark.greenend.org.uk/~sgtatham/bugs.html .


> Now we got rid off the gf-package, but Maxima is apparently fully
> under-specified w.r.t. handling
> of polynomials.


Huh?  Not sure what this means.


> On the main documentation page for polynomials one finds the empty sentence
>
> Polynomials are stored in Maxima either in General Form or as Cannonical
> Rational Expressions (CRE) form. The latter is a standard form, and is used
> internally by operations such as factor, ratsimp, and so on.
>
> In other words, no information is available when a polynomial suddenly
> becomes a CRE-vampire (looks like a polynomial, but is not really a
> polynomial)?
>

Huh? How are you concluding that "no information is available" when a
polynomial represented as a CRE?


> I guess the whole thing is historical baggage?
>

Not at all. Without CRE's, we wouldn't have GCD's, factorization, polynomial
division, radcan, Risch integration, Taylor expansions, etc. etc., not to
mention reasonably efficient polynomial arithmetic (see above).


> Apparently there are no flags to force Maxima to always use just one
> representation?
>

No.

By the way, the nice idea of showing with the output what type it is,
> doesn't
> work and has never worked:


False.  It has worked since I first used Maxima/Macsyma, in 1971.


> The documentation of for example gcdex says
>
>          (%i1) gcdex (x*(y + 1), y^2 - 1, x);
>                                         1
>          (%o1)/R/                 [0, ------, 1]
>                                        2
>                                       y  - 1
>
> but I have never seen such output-annotations (neither with CLisp nor with
> Ecl).
>

There may be problems in your environment (are you using some other front
end like wxMaxima or Sage?); this works fine for me (xmaxima interface to
Maxima 5.19.2 GCL 2.6.8):

(%i1) gcdex (x*(y + 1), y^2 - 1, x);

                       1
(%o1)/R/         [0, ------, 1]
                      2
                     y  - 1

So apparently the only possibility is to use totaldisrep at some places,
> until the current problem goes away, and to wait until the next problem
> shows up,
> where then some further totaldisrep have to be placed somewhere, and so on?
>

If you could be more specific about the problems you're having, perhaps we
could diagnose them and suggest therapy.  Totaldisrep is sometimes the right
therapy. Are you talking about problems in programming at the Maxima level,
or at the Lisp level?

             -s