Jeroen Demeyer on Wed, 03 Jun 2015 17:11:23 +0200

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Struggling with ellisogeny() and variable priorities

OK, thanks.

I got confused because the variable number no longer indicates the priority. May I suggest a patch to help debugging? See attachment.

commit 66074ac7ab742aa2c69e4f6d82780411a0b956cb
Author: Jeroen Demeyer <>
Date:   Wed Jun 3 17:06:58 2015 +0200

    Print variable priority in debugging output

diff --git a/src/language/es.c b/src/language/es.c
index 0f9c720..bba4770 100644
--- a/src/language/es.c
+++ b/src/language/es.c
@@ -2068,10 +2068,10 @@ dbg(GEN x, long nb, long bl)
   if (tx == t_PADIC)
     pari_printf("(precp=%ld,valp=%ld):", precp(x), valp(x));
   else if (tx == t_POL)
-    pari_printf("(%c,varn=%ld):", vsigne(x), varn(x));
+    pari_printf("(%c,varn=%ld,pri=%ld):", vsigne(x), varn(x), varpriority[varn(x)]);
   else if (tx == t_SER)
-    pari_printf("(%c,varn=%ld,prec=%ld,valp=%ld):",
-               vsigne(x), varn(x), lg(x)-2, valp(x));
+    pari_printf("(%c,varn=%ld,pri=%ld,prec=%ld,valp=%ld):",
+               vsigne(x), varn(x), varpriority[varn(x)], lg(x)-2, valp(x));
   else if (tx == t_LIST)
     pari_printf("(subtyp=%ld,lmax=%ld):", list_typ(x), list_nmax(x));