increase mini-gmp base support to 62
bodrato at mail.dm.unipi.it
Sat Feb 4 05:40:06 UTC 2017
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
>> 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:
It makes sense. Of course we can change it, it is undocumented/undefined.
More information about the gmp-devel