Skip to content

Commit

Permalink
Merge pull request #129 from oossen/master
Browse files Browse the repository at this point in the history
Proposed fix for Issue #127
  • Loading branch information
swewers committed Nov 9, 2021
2 parents c5341a1 + ed91dc5 commit c7d4990
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mclf/berkovich/piecewise_affine_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -1448,11 +1448,14 @@ def _restriction_to_path(gamma, L, a0):
is not, an error is raised.
"""

from sage.rings.rational_field import QQ

s = gamma.initial_parameter()
eta = gamma.tangent_vector(s)
e = eta.derivative(gamma._phi)
e = QQ(eta.derivative(gamma._phi))
assert e != 0, "error: gamma = {}, L = {}, s = {}, eta = {}".format(gamma, L, s, eta)
a = _compute_derivative(L, a0, eta)/e
a = QQ(_compute_derivative(L, a0, eta))/e
c = _compute_value(L, a0, gamma.initial_point())
b = c - a*s
h = AffineFunction(gamma, a, b)
Expand Down

0 comments on commit c7d4990

Please sign in to comment.