Bill Allombert on Wed, 02 Nov 2005 19:50:51 +0100


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

Re: bug in ellglobalred()


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.

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

Cheers,
Bill.