Small toom43 cleanup

bodrato at mail.dm.unipi.it bodrato at mail.dm.unipi.it
Tue Oct 20 21:22:46 CEST 2009


Ciao!

> Marco, Torbjörn, does this look ok?

Perfect.

But I have a question:

> +mpn_toom43_mul_itch (mp_size_t an, mp_size_t bn)
> +{
> +  mp_size_t n = 1 + (3 * an >= 4 * bn ? (an - 1) >> 2 : (bn - 1) /
> (unsigned long) 3);

> +static inline mp_size_t
>  mpn_toom53_mul_itch (mp_size_t an, mp_size_t bn)
>  {
>    mp_size_t n = 1 + (3 * an >= 5 * bn ? (an - 1) / (size_t) 5 : (bn - 1)
> / (size_t) 3);

You cast the divisor in toom43_itch to (unsigned long); toom53_itch cast
divisors do (size_t). It my last code I used a cast to (mp_size_t)...
The question is, do we really need a cast for a single digit?

Regards,
m

-- 
http://bodrato.it/



More information about the gmp-devel mailing list