increase mini-gmp base support to 62

Marco Bodrato bodrato at mail.dm.unipi.it
Sat Feb 4 05:40:06 UTC 2017


Ciao,

Il Ven, 3 Febbraio 2017 10:10 pm, Niels Möller ha scritto:
> "Marco Bodrato" <bodrato at mail.dm.unipi.it> writes:

>> Applied. But I changed again the code that checks the base. I used the
>> following:

>>  if (base > 1)
...
>>  else if (base >= -1)
>>    base = 10;

> It's documented that base = 0 means base 10.

... I can't find it in the manual :-) I read "base argument may vary from
2 to 62 or from -2 to -36".

> But should |base| = 1 also
> imply base 10? Would make more sense to me to treat that as an error.

We added this behaviour to the main library some years ago:
https://gmplib.org/repo/gmp/rev/e0b02c0e4e33

It makes sense. Of course we can change it, it is undocumented/undefined.

Best regards,
m

-- 
http://bodrato.it/papers/



More information about the gmp-devel mailing list