Opened 6 years ago
Last modified 6 years ago
#20074 closed enhancement
QQbar cleaning 2 — at Version 5
Reported by: | vdelecroix | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-7.1 |
Component: | number fields | Keywords: | |
Cc: | Merged in: | ||
Authors: | Vincent Delecroix | Reviewers: | |
Report Upstream: | N/A | Work issues: | |
Branch: | u/vdelecroix/20074 (Commits, GitHub, GitLab) | Commit: | 66b22b5e512916c0d3f6cfb32cfc1603bb6b1980 |
Dependencies: | #19954 | Stopgaps: |
Description (last modified by )
We further simplify QQbar code by:
- using python operator to indentify binary operators instead of strings. In other words we replace
'+'
byoperator.add
,'-'
byoperator.sub
, etc - writing only one function
binop
instead ofaddsub
andmuldiv
. - removing the methods
kind
,is_exact
,is_rational
,is_field_element
of descriptors and instead use the class themselves - removing the method
rational_value
and directly access the_value
attribute - detect unions earlier in the code to avoid constructing
ANBinaryExpr
As a consequence of the last items, we have exactification detected earlier
sage: sqrt17 = QQbar(17).sqrt() sage: sqrt19 = QQbar(19).sqrt() sage: (sqrt17 + sqrt19).exactify() sage: sqrt17 * sqrt19 + sqrt17 - sqrt19 * sqrt17 - sqrt17 0
Instead of 0.?e-17
on the current beta. See also the better output in doctests from the commit 012ae18
.
follow up: #19955
Change History (5)
comment:1 Changed 6 years ago by
- Branch set to u/vdelecroix/20074
- Commit set to 9264ff161e50900ce17ca62393d70b8abc4b4bb6
- Description modified (diff)
- Status changed from new to needs_review
comment:2 Changed 6 years ago by
- Commit changed from 9264ff161e50900ce17ca62393d70b8abc4b4bb6 to 012ae1865e4c2ab7bdf422e58d4b806b69ebc069
Branch pushed to git repo; I updated commit sha1. New commits:
012ae18 | Trac 20074: fix doctests
|
comment:3 Changed 6 years ago by
- Description modified (diff)
comment:4 Changed 6 years ago by
- Commit changed from 012ae1865e4c2ab7bdf422e58d4b806b69ebc069 to 66b22b5e512916c0d3f6cfb32cfc1603bb6b1980
comment:5 Changed 6 years ago by
- Description modified (diff)
Note: See
TracTickets for help on using
tickets.
Last 10 new commits:
Trac 19954: fix doctests
Trac 19954: fix sage_input doctests
Trac 19954: move the 34-gon as a doctest
Trac 19954: merge 7.1.beta1
Trac 19954: fix doctests
Trac 19954: doctest independent of execution order
Trac 19954: typo in documentation
Trac 19954: documentation
Trac 19954: remove useless "gaussian" functions
Trac 20074: qqbar cleaning