On Tue, Apr 28, 2009 at 12:33 AM, Martin Albrecht
<[email protected]> wrote:
>
> On Monday 27 April 2009, John Cremona wrote:
>> 2^16 is the smallest for which givaro is not used. In char.2, we switch to
>> NTL.
>
> Yes, it is likely in the conversion routine from NTL to Singular.
>
I managed to track this all the way to line 379 in
libs/singular/singular.pyx, which is
n1 = naInit(GF2_conv_to_long(GF2X_coeff(rep,i)))
In fact, the problem is not with naInit but with what goes into it (so
it looks like an NTL issue). To see this, add the following two lines
before 379:
temp = GF2_conv_to_long(GF2X_coeff(rep,i))
print "result of conversion: %s"%temp
And now run the following in Sage:
{{{
sage: F.<a> = GF(2^16)
sage: R.<x, y> = F[]
sage: R({(1,2):1})
}}}
The correct response (which occurs on some computers) is:
{{{
result of conversion: 1
x*y^2
}}}
The incorrect response (caught by John and also occuring on sage.math) is:
{{{
result of conversion: 0
0*x*y^2
}}}
Somehow NTL takes the coefficient 1 and messes it up to get 0, and
this is machine-dependent. This is as far as my detective skills go.
I don't even know how to check whether the problem is in GF2X_coeff or
in GF2_conv_to_long, let alone how to fix this. Hopefully someone
else can figure it out.
Best,
Alex
--
Alex Ghitza -- Lecturer in Mathematics -- The University of Melbourne
-- Australia -- http://www.ms.unimelb.edu.au/~aghitza/
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---