From 3b6e5fe3eed0b492812f22060b4d8fdadb2a4ea2 Mon Sep 17 00:00:00 2001 From: Marc Masdeu Date: Fri, 29 Nov 2024 16:24:57 +0100 Subject: [PATCH] Fixed tiny bug in derivative --- darmonpoints/schottky.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/darmonpoints/schottky.py b/darmonpoints/schottky.py index e739adc..313911e 100644 --- a/darmonpoints/schottky.py +++ b/darmonpoints/schottky.py @@ -274,7 +274,7 @@ def theta_derivative_naive( for i in NN: verbose(f"{i = }") if i > 2 and max_length == -1: - can_stop = True + can_stop = True for _, g in self.enumerate_group_elements(i): ga = act(g, a) gb = act(g, b) @@ -295,7 +295,7 @@ def theta_derivative_naive( new_ans = (num / den) * second_term old_ans = new_ans val = (new_ans / old_ans - 1).valuation() - if can_stop: + if can_stop or i == max_length: break new_ans.add_bigoh(val + new_ans.valuation()) if return_value: