John Cremona on Thu, 10 Dec 2015 11:26:44 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Regarding digits function
|
- To: "pari-users@pari.math.u-bordeaux.fr" <pari-users@pari.math.u-bordeaux.fr>
- Subject: Re: Regarding digits function
- From: John Cremona <john.cremona@gmail.com>
- Date: Thu, 10 Dec 2015 10:26:07 +0000
- Delivery-date: Thu, 10 Dec 2015 11:26:44 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=N/KhToZvA8o546W/tOndobHDQVvQhqfKGUTnwOaWeCk=; b=IYv4ZFfrElaaTL0KK2/U/SQAA8Y2bq8GG/w+MJ0CGFTsBXxpLWzSlS3DmkZ/RvEmmr 7xVrxaV48ACktzWXz9qAIJnAeejgMnTpjDZFxluGQQcv522ezvTBRiC/xMAxeiHF2Q5K gedk1AjAMwc8p1vC7mVVRdcnxKsHIJxON0z3LrWMM/JQXRf46l3i68BW9SZpBN7GFQWY jioLv8+ZOmeY9ONLxKiyIwC++hMWr84/wIBl6aT7oHRuBbUM4HILkQ7H94fRYl6FRFCB hZNM33VnavllwTMk3kN02nOCKiLjeNL4PoroXY9sVmxxiT9Qkzo8mnitFl3MU1FrKs/6 TgFA==
- In-reply-to: <20151210101314.GF23631@yellowpig>
- References: <CAC6O5f60Tq7mJHS-Je=qDG0q-uuismvyB7M8y72Exw7TaCyXww@mail.gmail.com> <20151210101314.GF23631@yellowpig>
On 10 December 2015 at 10:13, Bill Allombert
<Bill.Allombert@math.u-bordeaux.fr> wrote:
> On Thu, Dec 10, 2015 at 02:35:33PM +0530, chandra sekaran wrote:
>> Hi,
>>
>> digits(0) is giving empty vector. It should give [0].
>> Am i correct or wrong?
>
> No, this is expected: this is consistent with binary(0).
> The idea is to remove all leading zeros.
That is certainly the mathematically pure answer, but in Real Life we
strip leading 0s except for 0 itself, since we do not like empty
strings representing integers.
Perhaps the documentation could point this out?
John
>
> Cheers,
> Bill.
>