Skip to content

Commit

Permalink
"fix" precision settings
Browse files Browse the repository at this point in the history
solves Tommy's log problem
Underlying problem:
  map_coefficients is clever: a zero coefficient is mapped
  to zero(target), thus when applying it with
    x->setprecision(x, new)
  the target precision is ignored and the ring precision is used
  instead
  • Loading branch information
fieker committed Sep 21, 2023
1 parent e389cb9 commit ab46e1f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/LocalField/Elem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,9 @@ function Base.:(^)(a::LocalFieldElem, n::Int)
e = absolute_ramification_index(parent(a))
v = valuation(n, prime(parent(a)))
if v > 0
b = setprecision(a.data, precision(a.data)+v)
b = setprecision(base_ring(a.data), precision(a.data)+v) do
setprecision(a.data, precision(a.data)+v)
end
else
b = a.data
end
Expand Down

0 comments on commit ab46e1f

Please sign in to comment.