summaryrefslogtreecommitdiff
path: root/sci-mathematics/pari/files/pari-2.15.2-ellsea-r1.patch
blob: b8af421c0e56f419eba58faf937bf81f0fcb8848 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
A fix for upstream bug 2441 and gentoo bug 892035, with the changes to
CHANGES and the test suite stripped out (they don't apply cleanly).

From 6f556664bea5dae9d7101533be65f10b9d6332e2 Mon Sep 17 00:00:00 2001
From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
Date: Fri, 20 Jan 2023 11:13:46 +0100
Subject: [PATCH 1/1] ellcard(ellinit([1,1]*ffgen([41,16])))-> impossible
 inverse [#2441]

find_isogenous_from_Atkin: check that the kernel divides the division polynomial
---
 CHANGES               | 1 +
 src/basemath/ellsea.c | 3 ++-
 src/test/32/ellff     | 3 ++-
 src/test/in/ellff     | 3 +++
 4 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/src/basemath/ellsea.c b/src/basemath/ellsea.c
index a6871fa6a7..05f148eadd 100644
--- a/src/basemath/ellsea.c
+++ b/src/basemath/ellsea.c
@@ -852,7 +852,8 @@ find_isogenous_from_Atkin(GEN a4, GEN a6, ulong ell, struct meqn *MEQN, GEN g, G
       GEN a4t, a6t, h;
       a4a6t(&a4t, &a6t, ell, E4t, E6t, T, p);
       h = find_kernel(a4, a6, ell, a4t, a6t, pp1, T, p, pp, e);
-      if (h) return gerepilecopy(ltop, mkvec3(a4t, a6t, h));
+      if (h && signe(Fq_elldivpolmod(a4, a6, ell, h, T, pp))==0)
+        return gerepilecopy(ltop, mkvec3(a4t, a6t, h));
     }
   }
   pari_err_BUG("find_isogenous_from_Atkin, kernel not found");
-- 
2.30.2