Skip to content

Fix usage of symbolic comparison in several places #24992

@rwst

Description

@rwst

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 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.

CC: @cheuberg @dkrenn

Component: performance

Author: Ralf Stephan

Branch/Commit: u/rws/fix_usage_of_symbolic_comparison_in_several_places @ d08957e

Issue created by migration from https://trac.sagemath.org/ticket/24992

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions