Bug found in nightbuilds

Niels Möller nisse at lysator.liu.se
Mon Feb 17 08:12:03 UTC 2014


bodrato at mail.dm.unipi.it writes:

(on tuning of DIV_QR_1_UNNORM_THRESHOLD)

> Does tuning this constant work at all? This code is not suited to intract
> correctly with tuneup...
>
> The function one() in tuneup compares the timings of a function with an
> argument $n$ and thresholds $n$ and $n+1$, but here $n-1$ is compared with
> the thresholds,

I agree that seems fishy. I tried hacking div_qr_1 to delay decrementing
n until after the threshold checks, but then tuneup produces

#define DIV_QR_1_NORM_THRESHOLD          MP_SIZE_T_MAX  /* never */
#define DIV_QR_1_UNNORM_THRESHOLD        MP_SIZE_T_MAX  /* never */

which I don't think is right. At least the _NORM_THRESHOLD ought to be
lower. Before the change, I got

#define DIV_QR_1_NORM_THRESHOLD              0  /* always */
#define DIV_QR_1_UNNORM_THRESHOLD        MP_SIZE_T_MAX  /* never */

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list