On Sep 19, 12:50 am, "William Stein" <[EMAIL PROTECTED]> wrote:
> >    sage: FormalSum([(1,1/4),(1,-1/5)])
> >    -1/5 + 1/4
> >    sage: FormalSum([(1,1/4),(1,-1/5)]) == 1/4 - 1/5
> >    False
>
> That could be considered a bug and fixed.  I would
> be fine with something better, i.e., comparison computing
> the value of the formal sum if possible, and comparing them.

That would horribly break my group algebras class, which is based on
FormalSum. Couldn't one add a method evaluate() to the FormalSum
class, so we'd have

sage: FormalSum([(1,1/4),(1,-1/5)]) == 1/4 - 1/5
False
sage: FormalSum([(1,1/4),(1,-1/5)]).evaluate() == 1/4 - 1/5
True
?

David
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to