#10053: Equality testing instead of comparisons in differential forms code
-----------------------------------+----------------------------------------
Reporter: jvkersch | Owner: burcin
Type: defect | Status: needs_review
Priority: major | Milestone:
Component: symbolics | Keywords: forms, comparison, equality
Author: Joris Vankerschaver | Upstream: N/A
Reviewer: Niles Johnson | Merged:
Work_issues: |
-----------------------------------+----------------------------------------
Comment(by jvkersch):
Thanks Jean-Pierre, for providing that link and for your comments on this
matter. With this in mind, I think that this patch and #10041 address all
of the symbolic equality issues that arose in #9650 and subsequent
discussions:
* When dealing with symbolic expressions, we compare the corresponding
string representations (this is also how pynac does it) or call (lhs -
rhs).is_zero();
* For tuples of symbolic string expressions, we convert everything to
strings and compare the resulting tuples of strings (this is the approach
taken in #10041 to establish equality of two instances of
`CoordinatePatch`);
* For dictionaries whose values are symbolic expressions, we iterate over
the dictionary, convert the values to strings, and compare as we go along.
Using `itertools` this can be done quite efficiently, so I don't see any
room for improvement now. Comparing dictionaries of symbolic expressions
comes up when establishing equality of differential forms, which is the
subject of the current patch.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10053#comment:10>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.