Bill Allombert on Thu, 12 Dec 2024 19:24:44 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Is this the way to use auxiliary variables in vector initialized via multiple iterators?
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: Is this the way to use auxiliary variables in vector initialized via multiple iterators?
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Thu, 12 Dec 2024 19:24:40 +0100
- Delivery-date: Thu, 12 Dec 2024 19:24:45 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=math.u-bordeaux.fr; s=2022; t=1734027882; bh=bRx8pdIGtaMAiftm0Jf/DRDNO2OJ+WStr4J/G2vWXrM=; h=Date:From:To:Subject:References:In-Reply-To:From; b=miObLOUVQSm/qB6GKzgb7ayalLOsf46IryPklDR0AqjwwyIJtoP5GF/Scwfw92V3h O0S3FEFmWN8qsvmUaSCdQ623TdUlMu51iJFP5jYegqhsXxj6i/a/95Z8vgZvFObone StMEXIYcSP0dDa4Y0W5r6XZs9v/kQFGMSZQW57nOSuD6IMX/TFq9ATsSreomPn7wS9 qShxj3bmy+NvD4cSC31ks+DBqa/ER167GvAhufHMmaEGYPmh9SWE/EsbCJG9Lvfm5Q aNzy69vuYx1mXC4J7Fd0xeKvrclk1QdMojxaVq3syuU+F8b584AU1IhDrf9TEEtVSK JDZrhiKtTNnEK6NwjKLVIgZpp6nch471vZJkTR3ZwOzZh66S5gZMB5JVjReI3DBUlR Bw4i8ggMAqWem5a9AICKr4rnIKmoNTZl/eZXbTFJO2bvi9lQJWGjtbQ0oQ4zf+XqrM mzElXSSVdvPl4bgVen6ftqFzKEsIiiSLduv4zIR4Y9+mj+wfzvASxbpsuYgNAephoP 63PjR5I7czdRTQm7ATRXLSnZUcMR0xlQIiXk47f+qb64cq1FfYLqMPZpMfkuaueokc bVoTLRqhg7C6fjua+t2iESrqkhcnPk0FiKsI8TSG0GeCAKXUBm+Aj/LfEc2vKDRhTv OfCXXfWDTcQ4zZ01PSewknOQ=
- In-reply-to: <aedc5877d37d87f01df04b099964c84d@stamm-wilbrandt.de>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <aedc5877d37d87f01df04b099964c84d@stamm-wilbrandt.de>
On Wed, Dec 11, 2024 at 10:16:27PM +0100, hermann@stamm-wilbrandt.de wrote:
> Doc talks about
> https://pari.math.u-bordeaux.fr/pub/pari/manuals/2.17.0/users.pdf#page=25
>
> "To iterate over more than one variable, you may separate clauses with ; as
> in"
>
> I found no mentioning how to introduce auxiliary variables to avoid
> repetition of terms.
>
> I wanted to use auxiliary variable s for sum p^2+4*q^2, and this does the
> job:
>
> ? P=primes([2,100]);vecmin([s|p<-P;q<-P;s<-[p^2+4*q^2],isprime(s)])
> 41
> ?
>
> Is there another way of assignment to s without having to introduce
> auxiliary single element set?
No, but frankly I think this is fine like this.
Cheers,
Bill.