Changes between Version 1 and Version 2 of Ticket #24992


Ignore:
Timestamp:
03/17/18 09:45:00 (3 years ago)
Author:
rws
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24992 – Description

    v1 v2  
    1 Symbolic comparison is wrongly used in several places throughout Sage (overview https://trac.sagemath.org/wiki/symbolics/nonzero). The ticket replaces code involuntarily calling `__nonzero__` with a call of the `is_zero` and `is_equal` member functions to clarify if simplification is needed or not.
    2 
    3 Resulting speedups will not be surprising.
     1Symbolic comparison is wrongly used in several places throughout Sage (overview https://trac.sagemath.org/wiki/symbolics/nonzero). The ticket replaces code involuntarily calling `__nonzero__` with a call of the `is_zero` or `is_equal` member functions to clarify if simplification is needed or not. The code positions calling `__nonzero__` were obtained by raising an exception in `__nonzero__` and analyzing the resulting doctest fails. Of course not every simplification is unwanted so every case must be considered and tested.