Dear John, On 8 Feb., 10:40, "John Cremona" <[EMAIL PROTECTED]> wrote: > In your first example, where you have not defined x, ...
... but it is pre-defined, and explicitly saying "var('x')" has the same effect. > In this > system, "==" is used to create equations, not to test equality. That's nasty! My personal opinion is: When i say "==" in Sage then i expect a consistent behaviour, hence, a test for equality. Certainly the __eq__ method can do whatever the programmer wants, but it would be good style to make it consistent with the rest of Sage. Working in Sage, i do believe that Sage's conventions should overrule the conventions of any sub-system. Hence, if i want "==" to be interpreted in the Maxima-way, i would express that wish explicitly, say, by maxima('x==x') However, i do understand that this would hardly be possible to change now. By the way, i just tested "maxima('x==x')", and Sage *freezes*! Why? > In your second example, you are creating a specific ring containing an > element x, namely the ring of polynomials on one variable x over QQ. Maxima does some simplifications automatically. How can i do the same for polynomials over QQ? Note that simplify(((x^4+1)/((-1)*x^2))) again returns (x^4 + 1)/-x^2. Thank you for your answer, that made me understand the reason for the different behaviour of "==" (although i don't like it). Now i would like to understand why "maxima('x==x')" is so difficult for Sage. It doesn't give an error, it simply hangs. Yours sincerely Simon --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@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-support URLs: http://www.sagemath.org -~----------~----~----~----~------~----~------~--~---