Opened 18 months ago
Last modified 3 months ago
#28241 new defect
Bug with NumberField.abs_val
Reported by: | mercatp | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-9.3 |
Component: | number fields | Keywords: | days100 |
Cc: | Merged in: | ||
Authors: | Paul Mercat | Reviewers: | |
Report Upstream: | N/A | Work issues: | |
Branch: | u/mercatp/bug_with_numberfield_abs_val (Commits) | Commit: | df9290826e53ae5628d87fedda7f104342ae73a1 |
Dependencies: | Stopgaps: |
Description (last modified by )
The abs_val function from NumberField? is incorrect : for a complex place it computes the square of the absolute value, and not the absolute value.
For example, it does'nt satisfy the triangular inequality:
sage: K = NumberField(x**2+1, 'i') sage: p = K.places()[0] sage: K.abs_val(p, 1+1) 4.0 sage: K.abs_val(p, 1) 1.0
With the correction I propose there is no more this problem.
Change History (11)
comment:1 Changed 18 months ago by
- Branch set to u/mercatp/bug_with_numberfield_abs_val
comment:2 Changed 18 months ago by
- Commit set to df9290826e53ae5628d87fedda7f104342ae73a1
comment:3 Changed 18 months ago by
- Keywords days100 added
comment:4 Changed 18 months ago by
- Description modified (diff)
comment:5 Changed 18 months ago by
- Description modified (diff)
comment:6 Changed 18 months ago by
- Description modified (diff)
comment:7 follow-up: ↓ 8 Changed 18 months ago by
These changes introduce doctest failures in Sage
---------------------------------------------------------------------- sage -t --long number_field/S_unit_solver.py # 12 doctests failed sage -t --long number_field/number_field.py # 2 doctests failed ----------------------------------------------------------------------
comment:8 in reply to: ↑ 7 Changed 18 months ago by
It looks likes for every of these tests, it is enough to replace wrong result by the new one given by sage after introducting my change, and it's ok. But I understand nothing to what is done by S_unit_solver.py, so I would'nt be able to say if the new values are really correct.
Replying to vdelecroix:
These changes introduce doctest failures in Sage
---------------------------------------------------------------------- sage -t --long number_field/S_unit_solver.py # 12 doctests failed sage -t --long number_field/number_field.py # 2 doctests failed ----------------------------------------------------------------------
comment:9 Changed 13 months ago by
- Milestone changed from sage-8.9 to sage-9.1
Ticket retargeted after milestone closed
comment:10 Changed 9 months ago by
- Milestone changed from sage-9.1 to sage-9.2
Moving tickets to milestone sage-9.2 based on a review of last modification date, branch status, and severity.
comment:11 Changed 3 months ago by
- Milestone changed from sage-9.2 to sage-9.3
Branch pushed to git repo; I updated commit sha1. New commits:
Correct bug with abs_value of NumberField