Closed yuan-zhou closed 2 years ago
Confirmed in 9.7.beta5
Description changed:
---
+++
@@ -10,3 +10,6 @@
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 easiest cases (rationals, square roots of rationals) and raises an error in all other cases. This is better than sending the unusable print representation of algebraic numbers (including ?
) to Maxima.
+
New commits:
a627ce6 | src/sage/rings/qqbar.py (AlgebraicNumber_base._maxima_init_): New |
Author: Matthias Koeppe
Branch pushed to git repo; I updated commit sha1. New commits:
6204a76 | src/sage/rings/qqbar.py (AlgebraicNumber_base._maxima_init_): Fixup |
Branch pushed to git repo; I updated commit sha1. New commits:
3e560cf | src/sage/rings/qqbar.py: Add doctest |
Instead of defining _maxima_init_
, perhaps it's better to define _symbolic_
Branch pushed to git repo; I updated commit sha1. New commits:
58f4cd1 | src/sage/rings/qqbar.py (AlgebraicNumber_base._maxima_init_): Generalize using radical_expression |
Description changed:
---
+++
@@ -11,5 +11,5 @@
True
-To fix this, we provide elements of AA
and QQbar
with a _maxima_init_
method that handles the easiest cases (rationals, square roots of rationals) and raises an error in all other cases. This is better than sending the unusable print representation of algebraic numbers (including ?
) to Maxima.
+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.
Description changed:
---
+++
@@ -11,5 +11,8 @@
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.
+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.
LGTM.
Reviewer: Travis Scrimshaw
Thanks!
Changed branch from u/mkoeppe/error_in_comparing_two_symbolic_ring_elements to 58f4cd1
It seems a bug:
The following comparison is fine, though.
To fix this, we provide elements of
AA
andQQbar
with a_maxima_init_
method that?
) 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