#28542 closed defect (fixed)

change behaviour of denominator for p-adics

Reported by: caruso Owned by:
Priority: major Milestone: sage-9.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 p-adic 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 caruso

  • Branch set to u/caruso/denominator

comment:2 Changed 13 months ago by caruso

  • Authors set to Xavier Caruso
  • Commit set to 9ae31686f20a3f1c989f1873fc83c61178326104
  • Status changed from new to needs_review

Here is a fix. I've also implemented a method numerator().


New commits:

9ae3168denominator() and numerator() for p-adics

comment:3 Changed 13 months ago by chapoton

typos (twice both):

is `n` is nonnegative

and

normalized is such
Last edited 13 months ago by chapoton (previous) (diff)

comment:4 Changed 13 months ago by git

  • Commit changed from 9ae31686f20a3f1c989f1873fc83c61178326104 to c59a361af6102fe87eb062370926f50619aa9755

Branch pushed to git repo; I updated commit sha1. New commits:

c59a361typo

comment:5 Changed 13 months ago by git

  • Commit changed from c59a361af6102fe87eb062370926f50619aa9755 to caa6fe2a8503c4ed2f7d901fed8d76f19c5a91db

Branch pushed to git repo; I updated commit sha1. New commits:

caa6fe2fix typo (bis)

comment:6 Changed 13 months ago by chapoton

missing :: after otherwise.

comment:7 Changed 13 months ago by git

  • Commit changed from caa6fe2a8503c4ed2f7d901fed8d76f19c5a91db to 38bf7df0fe4f03665a12f293301d3ddc21d79d02

Branch pushed to git repo; I updated commit sha1. New commits:

38bf7dfadd missing ::

comment:8 Changed 13 months ago by chapoton

  • Reviewers set to Frédéric Chapoton
  • Status changed from needs_review to positive_review

ok

comment:9 Changed 13 months ago by vbraun

  • 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.