Bill Allombert on Sat, 30 Sep 2023 13:27:44 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: bug in simplify_shallow
|
- To: "Ruud H.G. van Tol" <rvtol@isolution.nl>
- Subject: Re: bug in simplify_shallow
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Sat, 30 Sep 2023 13:27:31 +0200
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1696073244; c=relaxed/relaxed; bh=OfS2GVmYIHfYB1GDvM/xCMle8X0MrzIs5MLt7YD1dlk=; h=DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: Mail-Followup-To:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To; b=ZaxGwM3sajo8T6Jaqxpvsz4AtmjJ6Y9UDqq9gNTuW8mzg5onF74ORILMbd0XsgoSK3lvh82LNfpVGdVBzfzHXYlIqlA5RFZ6V1fn32nWkWSkv66RRy3aSZD4F3R4yTSXTYcjyIF+SAL7olluNkAGM/GlkEqN2PcuvP1NTQTIcYLeLX1fDMe2z6iL1s7qCfHQpKuXSb6D9ABMOF8YCat7Z2bTPKPhehsjsnrfpDScg4r9M4smDFXosah511ltxW5SDOxO3YVoSH52RAHk1ishLXy3nGO/lNOEwGJ43JWviHC3phDAeDaQbnmJCtFakmfcdPmMmHmwrj6hP/vh4y+/SAuAVIN7mtvbkDCXEbNmdszmlOqMJCWBAlgtZT+qC4OSDEIxnFKMLVgwqRG4JkcRLI12nuf7sRYIYat57HsZsrUzsWxnf/GZPT2c8TDXa3rCxvvuOz3dc+EKAv+p0fRGyQENfPsjtbWSlXVV2erNtzNOTjPCYwMZXsOZr4zqmQwzdzUMQIx+RJ2n3txmPCCHAbZ6zuJiDCQ3tfr282xOxzvJUg11kMZarhfrN9Uz6bw3nbcwwFEwfN2x/hRaEmFWDkyakYLzb8aOlcaRhzLOiFG4rf6YXaLaDiqJGD6a+BKTiull8gCeyPac0rTJcYmLJBBASuiCIQSWMHeUCBcgxjw=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1696073244; cv=none; b=3t8+qdypLLGSICKotTg9zibPoTUsSFQcN+dWH/Fvc6uXfmPA4cViQAd72aC1DvRfi53f25HQwRUZuDikp7IGV4d7HJHDURHbEVkclpGBY58p+0R/cm04bHH7dkEnDOZ1FTU+IwmYMWF48IIc5/ozinQz+E2Mpie/18hMbHNFbTY6r/IEeE1tIKG/tbDh7JQYgu3re9+SGZ1uOQOvBliXAbwdJpl+fIvWxTVpDstj5yPHgt4qhF9FtPv5I8Te4PPdi67iORMxXmZBgwqVCGYOfGXfq3AfgFUO38YM9Jl9DiQZAiFTSjC/fbBNAx/UcclOz5KznlHr+pJT5u/AFTAtp06sZECjtQMY5ulDQ1WMBYPYPhvif1IgQXkt/Evl4LwmpPcsTFNwWvAScpU8+THijHTqC3WqruSHkgjt/BdDGYK+Ku8OWmKpdqyoTxPnkscVC4IXcmZUBWg6B3hMJX+vn913U6X+c1NdZCyTQG0iynOGG60ZNbLekx/hsviMfVth42WTMNYMe9IebeT0u88k52Dik2fLhexdvKsX62Q0+xYG5UaEbPzW9aFyWO7sDA42SJIbrlowKMHMkc0meRktrm3vJA2ouUyTI+82cHiDoMVG9SAikMFmbseFYglxikXR7pI5d0M4PHHDNs+oUmf0iqBYjQD3S7V+yJIZM6+tj5Q=
- Authentication-results: smail; arc=none
- Cc: pari-dev@pari.math.u-bordeaux.fr
- Delivery-date: Sat, 30 Sep 2023 13:27:44 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1696073244; bh=OfS2GVmYIHfYB1GDvM/xCMle8X0MrzIs5MLt7YD1dlk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=p5xRtqa82Cs9mW1uKGSdcfZ0lmZFixb2n8LmOK5tf54+j49NuOG3l2oFlCJxDr00N YvCNCY6kXLL2t1CdaMbzYNAVIgKNXfVVAPQjzBH1Ihjrnania2Nj8ACEMtI/Nb4hpB 6Y6/KELAnXA0kEvmBRqmhhSIp97sS+umRniM0BDeuzdfoWWoWxSoVpR+LWWSqCylMK OpUhvvbjK4uJpYsOOjE1zywLTuF+Oarx3JLRJNm29crqplag3PYqmtpntUNat2a7p7 /39PSBij+b4POa5Q2osiO/pGj5cxiGbHl/YLvRazOx62DHjGfsnbPQLBH0rLHhZqPP DObv99cVVqvNTHXIz+y0lB/xUaSI1ruBke2QywIb5e6W/pLyQv5+C2/KG5ineJbXUd D9fKPaSLiCJkj44Od0EKRwb9uSUSTExK0bQnh88lJgijL/hD8ZFKQjB3bLqUa2WggO yYS6wU8kS14Lm0jZ7cMeS6VWr3tSTjJfYSLJPnSK3JPGxnKMomBrc17WkUgD0TnuUk Y3ZPFbw33vtDW+OJRfCAlYLbjG6a6uFiCP5cDO0RSxNeuOBbmSKs7gI74NKvILo0tp PwpnUGSsLj3fjhU+/bYxz+nVV5POcCNogV28E6XB5zoAwAdMVYefNZ01EtgY+6GyR3 c17aWkLCh2yiC5MjDpf9jiSQ=
- In-reply-to: <696e7537-01fd-4ec0-90e6-c02df2cfeca0@isolution.nl>
- Mail-followup-to: "Ruud H.G. van Tol" <rvtol@isolution.nl>, pari-dev@pari.math.u-bordeaux.fr
- References: <1e144fa5-864d-450e-a109-1fac8300bf88@isolution.nl> <CANXmBjzx4t330CnCzz4TzMfPFVVYg+-T7iskqECzh_+_2G2ABw@mail.gmail.com> <ZOoCXdx+VmSoRmML@math.u-bordeaux.fr> <ZOtHFLdXr0FuLCzY@seventeen> <70235df6-488a-412a-b2c6-7c49d5898b99@isolution.nl> <ZOtaInkQQYBBw9C7@math.u-bordeaux.fr> <08b1111d-de4a-47e0-b802-69a5a0c2199e@isolution.nl> <ZRc8Lv0zNlmZW8+K@seventeen> <696e7537-01fd-4ec0-90e6-c02df2cfeca0@isolution.nl>
On Sat, Sep 30, 2023 at 01:10:23PM +0200, Ruud H.G. van Tol wrote:
>
> On 2023-09-29 23:05, Bill Allombert wrote:
> > On Sun, Aug 27, 2023 at 05:01:07PM +0200, Ruud H.G. van Tol wrote:
> > > On 2023-08-27 16:13, Karim Belabas wrote:
> > > > [...] What Bill and I suggested was to return "a copy of the
> > > > inserted element"
> > > > instead. I don't really see a scenario where this would break
> > > > compatibility ... except this would make insertion about twice slower,
> > > > even in cases where the returned value is ignored.
> > > Yes, so I wondered if the "void calling context" is decidable at
> > > compile-time, such that any new overhead can be avoided where feasible.
> > Indeed there used to be a bug in the compiler that I just fixed
> > that caused it to fail to take the void context into account in
> > some case.
>
> Thanks for the changes and fixes!
>
> (also for not making it return the final length of the list ;) )
Well, there still the issue that
? my(L=List());a=listput(L,5)
? a
%2 = 0
because GP convert void to 0...
> P.S. In paridecl.h, comparing listpop:
>
> void listpop(GEN L, long index);
>
> shouldn't these now also be void?
>
> GEN listinsert(GEN list, GEN object, long index);
> GEN listput(GEN list, GEN object, long index);
>
> (or does GEN cover that already?)
GP uses listinsert0 and listput0 which returns void.
I have kept the return value for the C functions.
Cheers,
Bill.