On 4/26/07, Jonathan William Bober <[EMAIL PROTECTED]> wrote:
>> There also seem to be some other issues which come from maxima. One
> example is
>
> sage: print B
>                                 sqrt(3)  I   1
>                                 ---------- - -
>                                     2        2
> sage: bool(B^3 == 1)
> False
> sage: bool(expand(B^3) == 1)
> True

That's just how maxima works.  It can't, in general, test equality or not with
certainty, and errors on the side of caution.   This is I think a really hard
problem in general...   I could make SAGE's bool try expanding, simplifying,
etc. first (??)

>
> A stranger example is
>
> sage: print A
>                                       I  pi
>                                      ------
>                                        5
>                                     e
> sage: print A*A*A*A*A*A*A*A*A*A
>                                   - (- "*"())

This is intriguing.  What's happening is that SAGE is sending the
following to maxima
to be evaluated, since we haven't optimized yet much minimizing th enumber of
parenthesis, etc:
(((((((((exp(((%i) * (%pi)) / (5))) * (exp(((%i) * (%pi)) / (5)))) *
(exp(((%i) * (%pi)) / (5)))) * (exp(((%i) * (%pi)) / (5)))) *
(exp(((%i) * (%pi)) / (5)))) * (exp(((%i) * (%pi)) / (5)))) *
(exp(((%i) * (%pi)) / (5)))) * (exp(((%i) * (%pi)) / (5)))) *
(exp(((%i) * (%pi)) / (5)))) * (exp(((%i) * (%pi)) / (5)))

And, directly in MAXIMA, if you past the above, you get nonsense -- so
I think there is a bug
in Maxima itself:

$ maxima
Maxima 5.11.0 http://maxima.sourceforge.net
Using Lisp CLISP 2.41 (2006-10-13)
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
This is a development version of Maxima. The function bug_report()
provides bug reporting information.
(%i1) (((((((((exp(((%i) * (%pi)) / (5))) * (exp(((%i) * (%pi)) /
(5)))) * (exp(((%i) * (%pi)) / (5)))) * (exp(((%i) * (%pi)) / (5)))) *
(exp(((%i) * (%pi)) / (5)))) * (exp(((%i) * (%pi)) / (5)))) *
(exp(((%i) * (%pi)) / (5)))) * (exp(((%i) * (%pi)) / (5)))) *
(exp(((%i) * (%pi)) / (5)))) * (exp(((%i) * (%pi)) / (5)))
;
(%o1)                             - (- "*"())
(%i2)


I'll investigate reducing the number of spurious parenthesis and see
if this helps.

> I've never used computer algebra systems much before, so perhaps these
> types of limitations are common and I just don't know about it. Either
> way, except for perhaps
>
> - (- "*"())
>
> these problems seem to stem from maxima, so there is unlikely to be a
> simple solution. I don't know where the weird - (- "*"()) comes from,
> though - it seems to be ok in maxima:
>
> (%i52) A;
>                                      %i %pi
>                                      ------
>                                        5
> (%o52)                             %e
> (%i53) A*A*A*A*A*A*A*A*A*A;
> (%o53)                                 1

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://sage.scipy.org/sage/ and http://modular.math.washington.edu/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to