| Karim BELABAS on Tue, 4 Mar 2003 17:28:28 +0100 (MET) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: znstar() bug (gmp kernel) |
On Tue, 4 Mar 2003, Bill Allombert wrote:
> On Mon, Mar 03, 2003 at 01:57:18AM -0500, Igor Schein wrote:
>> ? znstar(35962368471727496841722887);
>> *** impossible assignment I-->S
>>
>> I coudn't reproduce it without gmp or on Solaris.
>
> Well spotted! You found the only line in Gerhart code that assume
> that integers are MSW!
> #ifdef LONG_IS_64BIT
> - if (tf > 3 || (tf == 3 && bfffo((ulong)n[2]) < 5)) /* n too large */
> + if (tf > 3 || (tf == 3 && bfffo(int_MSW(n)) < 5)) /* n too large */
> return NULL;
> #else /* 32 bits */
> - if (tf > 4 || (tf == 4 && bfffo((ulong)n[2]) < 5)) /* n too large */
> + if (tf > 4 || (tf == 4 && bfffo(int_MSW(n)) < 5)) /* n too large */
> return NULL;
> #endif
> /* now we have 5 < n < 2^59 */
I had a similar fix :-). Also, there's no point using bfffo to compare with a
constant [ modified in CVS ].
Karim.
P.S: Btw, it's Gerhard [ Niklasch ].
--
Karim Belabas Tel: (+33) (0)1 69 15 57 48
Dép. de Mathématiques, Bât. 425 Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud http://www.math.u-psud.fr/~belabas/
F-91405 Orsay (France) http://www.parigp-home.de/ [PARI/GP]