Skip to content

Error in comparing two Symbolic Ring elements #34235

@yuan-zhou

Description

@yuan-zhou

It seems a bug:

sage: bool(AA(sqrt(2))/pi == sqrt(2)/pi)
TypeError: ECL says: THROW: The catch MACSYMA-QUIT is undefined.

The following comparison is fine, though.

sage: bool(AA(sqrt(2)) == sqrt(2))
True

To fix this, we provide elements of AA and QQbar with a _maxima_init_ method that

  • handles the case of elements for which Sage can find a radical expression and
  • raises an error in all other cases.
    This is better than sending the unusable print representation of algebraic numbers (including ?) to Maxima.

CC: @mkoeppe @DaveWitteMorris @videlec @tscrim

Component: symbolics

Author: Matthias Koeppe

Branch/Commit: 58f4cd1

Reviewer: Travis Scrimshaw

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions