Vasili Burdo on Wed, 22 Jul 2015 20:59:23 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: Support of binary and hexadecimal integers in PARI/GP


Bill,

Please, consider additional patch to fix strtor() I sent in my last message.
Without it, peculiar real numbers are possible - like this:
0xABCDEF.12345E123 :)
They are no harm, but ugly beyond recognition.

Thanks,
Vasili

2015-07-22 14:46 GMT+03:00 Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>:
> On Thu, Jul 16, 2015 at 10:35:47AM +0200, Bill Allombert wrote:
>> On Thu, Jul 16, 2015 at 01:53:50AM +0300, Vasili Burdo wrote:
>> > >Even so, this is still worthwhile to do.
>> > Ok. Will deliver tomorrow.
>>
>> Do not trouble yourself, I did it already, see GIT branch
>> bill-binary-hex.
>>
>> > >I assume your patch was created to apply to PARI 2.7.4 ?
>> > No, it's for master - i.e. trunk.
>> > I'm new to git - work mostly w/ perforce and svn
>>
>> Your patch only applied to PARI 2.7.4 though, I had to forward port it.
>>
>> > >Your patch changes the result of strtoi
>> > Hm, could you point me to the test which fails?
>> >
>> > >? strtoi("0b111")
>> > >%1 = 7
>> > >instead of 0.
>> > Hm, silent failure in basecase and something useful w/ my changes.
>> > Looks like my change is better :)
>>
>> Well, this is not a silent failure (it stop reading at the first non digit
>> character), but it happens it was not documented, so it is probably OK, though
>> the documentation of strtoi need to be updated.
>
> Well, I have applied this part of the patch and I have updated strtoi.
>
> Thanks for your work!
> Bill.
>