Opened 5 years ago
Last modified 3 years ago
#23449 new enhancement
Fast logarithm for padic floats
Reported by:  caruso  Owned by:  

Priority:  major  Milestone:  sage8.1 
Component:  padics  Keywords:  sd87, padicIMA, padicBordeaux 
Cc:  roed, saraedum  Merged in:  
Authors:  Xavier Caruso  Reviewers:  
Report Upstream:  N/A  Work issues:  
Branch:  u/roed/padiclog (Commits, GitHub, GitLab)  Commit:  451dfd3f6f506f67cbf2dda7f4c1f78be5b83e26 
Dependencies:  Stopgaps: 
Description
This ticket provides a fast implementation of the computation of the logarithm for padic floats. It is the continuation of #23043.
Change History (9)
comment:1 Changed 5 years ago by
 Branch set to u/caruso/padiclog
comment:2 Changed 5 years ago by
 Commit set to 3465a147454b7a018eedef903558bdff97005aff
 Keywords sd87 added
comment:3 Changed 5 years ago by
 Branch changed from u/caruso/padiclog to u/roed/padiclog
comment:4 Changed 5 years ago by
 Commit changed from 3465a147454b7a018eedef903558bdff97005aff to 451dfd3f6f506f67cbf2dda7f4c1f78be5b83e26
Xavier, what's the status of this ticket? What still needs to be done before it's ready for review?
New commits:
451dfd3  Merge branch 'u/caruso/padiclog' of git://trac.sagemath.org/sage into t/23449/padiclog

comment:5 followup: ↓ 6 Changed 5 years ago by
I have a question.
If x is a floating point number which is very close to a p^n
root of unity, say x = zeta_(p^n) + h
with h very small, the log(x) has a very high valuation. In that case, what should we do? Should we compute log(x) at the relative precision specified in the parent (but this can be costly if h is very small) or should we instead compute log(x) at some reasonable precision and don't care if the returned result is not sharp?
comment:6 in reply to: ↑ 5 Changed 5 years ago by
Replying to caruso:
I have a question.
If x is a floating point number which is very close to a
p^n
root of unity, sayx = zeta_(p^n) + h
with h very small, the log(x) has a very high valuation. In that case, what should we do? Should we compute log(x) at the relative precision specified in the parent (but this can be costly if h is very small) or should we instead compute log(x) at some reasonable precision and don't care if the returned result is not sharp?
This shouldn't be an issue if we handle things right way: before computing the series expansion, first replace x by x^{p^n}
for some n which is large enough to raise the valuation of x1 above some fixed cutoff (say 1). Then divide the final answer by p^n
.
comment:7 Changed 4 years ago by
I'm not sure that your answer resolves my problem.
Suppose that we are working with e*N
digits of precision (where e is the absolute ramification index) and that h
has valuation e*N/2
.
If x = zeta_(p^n) + h
, then the result of x^{p^n}
will be 1 + p^n*h/zeta_(p^n)
truncated modulo p^N
. Therefore, the value we will get for log(x)
is h/zeta_(p^n)
truncated modulo p^(Nn)
. Thus only e*(N/2  n)
digits will be correct. This is not sharp.
In comparison, if we just expand the series of log(1 + h')
with h' = zeta_(p^n)  1 + h
, we get e*N/2
correct digits (the first e*N/2
digits vanish), which is a bit better (but still not sharp).
Am I mistaken?
comment:8 Changed 4 years ago by
 Keywords padicIMA added
comment:9 Changed 3 years ago by
 Keywords padicBordeaux added
New commits:
Logarithm of padic floats