Opened 3 years ago
Closed 3 years ago
#25210 closed enhancement (fixed)
Add option to make QQbar / AA print using radicals
Reported by:  ghBrentBaccala  Owned by:  

Priority:  minor  Milestone:  sage8.3 
Component:  algebra  Keywords:  AlgebraicField, QQbar, AA 
Cc:  Merged in:  
Authors:  Brent Baccala  Reviewers:  Sébastien Labbé 
Report Upstream:  N/A  Work issues:  
Branch:  4279b0a (Commits, GitHub, GitLab)  Commit:  4279b0a51703146f18b871a74c0eb6c893fb78d3 
Dependencies:  Stopgaps: 
Description
Add an option to make elements in QQbar / AA print using radical format:
sage: AA(19).sqrt() 4.358898943540674? sage: QQbar.zeta(6) 0.500000000000000? + 0.866025403784439?*I sage: AA.options.display_format = 'radical' sage: AA(19).sqrt() sqrt(19) sage: QQbar.zeta(6) 1/2*I*sqrt(3) + 1/2
Change History (12)
comment:1 Changed 3 years ago by
 Branch set to u/ghBrentBaccala/25210
 Commit set to 3dcc7e07823e58f9e108c4d7819304bae6bf1050
comment:2 Changed 3 years ago by
 Commit changed from 3dcc7e07823e58f9e108c4d7819304bae6bf1050 to bf16d261f23c0c14d06bf1564808b6618746a244
Branch pushed to git repo; I updated commit sha1. New commits:
bf16d26  Merge branch 'u/ghBrentBaccala/25210' into 8.2.rc3

comment:3 Changed 3 years ago by
 Commit changed from bf16d261f23c0c14d06bf1564808b6618746a244 to 09f350f30945049aa43b23ddb0769626aa6c63c5
Branch pushed to git repo; I updated commit sha1. New commits:
09f350f  Trac #25210: avoid infinite recursion

comment:4 Changed 3 years ago by
Related tickets:
 #17516: Radical expressions for roots of polynomials using Galois theory https://trac.sagemath.org/ticket/17516
 #21556: QQbar.radical_expression should raise exception if it fails https://trac.sagemath.org/ticket/21556
comment:5 Changed 3 years ago by
 Status changed from new to needs_review
comment:6 Changed 3 years ago by
I think you do not need this line anymore:
from sage.symbolic.ring import SR # Lazy to avoid cyclic dependency
comment:7 Changed 3 years ago by
 Reviewers set to Sébastien Labbé
 Status changed from needs_review to needs_work
Other than that, I get All tests passed on my machine on top of rc3. Thanks for this contribution. I will put AA.options.display_format = 'radical'
in my init.sage
.
comment:8 Changed 3 years ago by
 Commit changed from 09f350f30945049aa43b23ddb0769626aa6c63c5 to 4279b0a51703146f18b871a74c0eb6c893fb78d3
Branch pushed to git repo; I updated commit sha1. New commits:
4279b0a  Trac #25210: remove unnecessary import

comment:9 Changed 3 years ago by
 Status changed from needs_work to needs_review
comment:10 Changed 3 years ago by
 Status changed from needs_review to positive_review
comment:11 Changed 3 years ago by
 Milestone changed from sage8.2 to sage8.3
comment:12 Changed 3 years ago by
 Branch changed from u/ghBrentBaccala/25210 to 4279b0a51703146f18b871a74c0eb6c893fb78d3
 Resolution set to fixed
 Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
The patch adds a GlobalOption to the AlgebraicField class allowing the display format to be toggled in the manner shown.
New commits:
Trac #25210: add AlgebraicField option to print using radicals
Trac #25210: switch back to 'decimal' format to pass test suite