[sage-support] Re: Overflow creating finite field element

2014-08-19 Thread Samuel Neves
That seems to be it. Thanks! -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To post to this group, send email to sage

[sage-support] Re: Overflow creating finite field element

2014-08-12 Thread Peter Bruin
Hello, I seem to have run across a potential bug on Sage: > > p = previous_prime(2^64) >> F. = GF(p^2) >> x * 2**63 >> >> > throws a "overflow in t_INT-->long assignment" exception creating the > element x * 2**63. > This is indeed a bug. Sage calls the wrong PARI function for this conversion:

[sage-support] Re: Overflow creating finite field element

2014-08-11 Thread Oleksandr Kazymyrov
Hi Samuel, I guess t_INT is the 64-bit sign integer in the pari library, which is written in C. It means the positive size is 63 bits. The number 2^63 corresponds to -1 and pari raises an error. The following code works fine. sage: p = previous_prime(2^64) sage: F. = GF(p^2) sage: x * (2**63 -