Karim Belabas on Mon, 07 Nov 2005 19:43:13 +0100


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

Re: bug in ellglobalred()


* Bill Allombert [2005-11-02 19:52]:
> On Wed, Nov 02, 2005 at 04:33:45PM +0000, Prof. J. E. Cremona wrote:
>> The following is wrong:
>>
>>          GP/PARI CALCULATOR Version 2.2.12 (development CHANGES-1.1375)
>>             i686 running linux (ix86/GMP-4.1.4 kernel) 32-bit version
>>      compiled: Nov  2 2005, gcc-3.4.3 20041212 (Red Hat 3.4.3-9.EL4)
>>                (readline v4.3 enabled, extended help available)
>>
>>
>> (16:29) gp > ellglobalred(ellinit( [0,0,0,-13980,313328]))
>> %1 = [42816, [1, 0, 0, 0], 24]
>>
>> -- the conductor should be 128448, i.e. the exponent of 3 should be 2
>> and not 1.
>>
>> A fix would bemuch appreciated -- someone must have an idea of which
>> recent changes might have caused this.
>
> This bug was introduced with this change:
>
>   PatchSet 7337
>   Date: 2005/10/29 15:40:01
>   Author: kb
>   Branch: HEAD
>   Tag: (none)
>   Log:
>   6- 'int' C type is now reserved for boolean values. Use 'long' instead.
>
>           src/modules/elliptic.c:1.192->1.193
>
> so 2.2.11 should be correct.
>
> It seems Karim 'u' key get stuck and a lot of 'int' became 'ulong'
> sometime with side-effect.

I believe I have now fixed the problem [ revert to signed computations! ]

> We should probably use elldata to build a comprehensive test-suite for
> ellglobalred().

John sent me a nice script doing exactly this. I've included it as

'make test-ellglobalred'

(~ 5 minutes to check all conductors up to 10^4). Having installed elldata
is a pre-requisite.

Thanks!

    Karim.
--
Karim Belabas                  Tel: (+33) (0)5 40 00 26 17
Universite Bordeaux 1          Fax: (+33) (0)5 40 00 69 50
351, cours de la Liberation    http://www.math.u-bordeaux.fr/~belabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux.fr/  [PARI/GP]