Bill Allombert on Tue, 20 May 2025 21:29:49 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: forpart of zero and fixed length
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: forpart of zero and fixed length
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Tue, 20 May 2025 21:29:45 +0200
- Delivery-date: Tue, 20 May 2025 21:29:49 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=math.u-bordeaux.fr; s=2022; t=1747769387; bh=O02QmuZrIkJcap7uY1Swh16jRnaooWn7OzXp7te/zrU=; h=Date:From:To:Subject:References:In-Reply-To:From; b=PAdEv1/wtI1NEkNZf2eFc79yuZNA0amkVS4SWKGd++3iziyGBGVWIGZCjuxfjZKxX zKglRGKOupqsDEaTBeJtNvCfMElYf2L8Kpudh8dkmvgnVBMUAX/A8rOKLYo1y7qJSk O6RoqudsFlDP223PchtOvc1Pg47XCa/JR6fS2mJQXOs29iHJfhaXQOq9MSy24bMmT2 d95+DwACg5/Kj0318wfU+YwIrh+f6DK/LAHx1DP1xhiM/rGo3nwqS+6SoWwzNFpKvP MHqQnjKZQIGSlIbf3zmsawhxz5ybjG1ZbKOM/rl1mgNmNPESjTt4PebbfLY3P8yusZ 63Lgi+lfu6KOVutDApoFgTZ0qf7ajP5s8T52w/wC5BOCHra5Jcd6PsPfTE7cba95kG JUeEEXjdrTz187RlW/b9u5MjW/GwZ0HjBJZz1VtCaLu9avw0vB/2ky2MJJ/tpiiIw+ 2erEX8Q7m44a1so86WCb3+B7m9s4hdTJLwHEISTOnYehUSNUQx9OFalfW6Vd3T/T2Z 2A4YbjCO7HcIvZbA830gJU4qd0PVmMCHEDU/0VjNG5x4G5NxUnEcdSY0zsYd3cfInb w/J/jYhfxWtY0ACZ00/eZIKyPIafwnBVKMQf0iDKMc9iv82G6vNFR8dKcB03FJ0SI1 83OTOd1PeE+LVBEksV0P6jMQ=
- In-reply-to: <CAJkPp5MnhDc2kGbUbBZb6hHe1pEM=jQmLbUnDQtNFmqYu1MzrQ@mail.gmail.com>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <CAJkPp5MdteeMcx4H5fBPVBK3ugdjsixYtODkkTR_J0CaLPyycw@mail.gmail.com> <CAJkPp5MnhDc2kGbUbBZb6hHe1pEM=jQmLbUnDQtNFmqYu1MzrQ@mail.gmail.com>
On Tue, May 20, 2025 at 02:52:20PM -0400, Max Alekseyev wrote:
> On a related note, I do not understand why I'm getting different results in
> the following two examples (fist one looks like a bug):
>
> ? forpart(p=5,print(p),[0,5],[2,2])
> Vecsmall([1, 4])
> Vecsmall([2, 3])
This is correct: the length is the number of nonzero entries.
> ? forpart(p=5,print(p),[0,5],2)
> Vecsmall([0, 5])
> Vecsmall([1, 4])
> Vecsmall([2, 3])
>
> Also, in the second case, shouldn't 2 be interpreted as nmax and partitions
> with smaller parts (=1) be also generated?
By default, parts are positive and we remove zero entries unless amin <= 0, in which case we fix the size #X = nmax.
Cheers,
Bill.