Opened 13 months ago
Closed 13 months ago
#28542 closed defect (fixed)
change behaviour of denominator for padics
Reported by:  caruso  Owned by:  

Priority:  major  Milestone:  sage9.0 
Component:  padics  Keywords:  
Cc:  roed  Merged in:  
Authors:  Xavier Caruso  Reviewers:  Frédéric Chapoton 
Report Upstream:  N/A  Work issues:  
Branch:  38bf7df (Commits)  Commit:  38bf7df0fe4f03665a12f293301d3ddc21d79d02 
Dependencies:  Stopgaps: 
Description
Currently, if x
is a padic number indistingushable from 0, the call x.denominator()
raises an error. IMNO, it is not justified (and not convenient at all).
Instead, I propose to let it return p^n
where n
is the smallest integer for which we have the guarantee that p^n*x
is integral, i.e. is O(p^N)
with N
nonnegative.
Change History (9)
comment:1 Changed 13 months ago by
 Branch set to u/caruso/denominator
comment:2 Changed 13 months ago by
 Commit set to 9ae31686f20a3f1c989f1873fc83c61178326104
 Status changed from new to needs_review
comment:3 Changed 13 months ago by
typos (twice both):
is `n` is nonnegative
and
normalized is such
comment:4 Changed 13 months ago by
 Commit changed from 9ae31686f20a3f1c989f1873fc83c61178326104 to c59a361af6102fe87eb062370926f50619aa9755
Branch pushed to git repo; I updated commit sha1. New commits:
c59a361  typo

comment:5 Changed 13 months ago by
 Commit changed from c59a361af6102fe87eb062370926f50619aa9755 to caa6fe2a8503c4ed2f7d901fed8d76f19c5a91db
Branch pushed to git repo; I updated commit sha1. New commits:
caa6fe2  fix typo (bis)

comment:6 Changed 13 months ago by
missing :: after otherwise.
comment:7 Changed 13 months ago by
 Commit changed from caa6fe2a8503c4ed2f7d901fed8d76f19c5a91db to 38bf7df0fe4f03665a12f293301d3ddc21d79d02
Branch pushed to git repo; I updated commit sha1. New commits:
38bf7df  add missing ::

comment:8 Changed 13 months ago by
 Reviewers set to Frédéric Chapoton
 Status changed from needs_review to positive_review
ok
comment:9 Changed 13 months ago by
 Branch changed from u/caruso/denominator to 38bf7df0fe4f03665a12f293301d3ddc21d79d02
 Resolution set to fixed
 Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
Here is a fix. I've also implemented a method
numerator()
.New commits:
denominator() and numerator() for padics