Bill Allombert on Thu, 30 May 2024 11:57:54 +0200
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Using builtin PARI operators in gp
|
- To: pari-dev@pari.math.u-bordeaux.fr
- Subject: Re: Using builtin PARI operators in gp
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Thu, 30 May 2024 11:57:49 +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=1717063070; c=relaxed/relaxed; bh=PDz2pubH72kkQWQd/rAajXRxqHdt74hGAJqd4cj9pro=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: Content-Transfer-Encoding:In-Reply-To; b=p0ld2A6qCdSsJ4JiA8xMqVibsVZ/CD8TqDOFxOjSCCwuiaBRjuQnfQf7xnGybQzUXSxogqWG8iodCmzMKvoF+7q4L6qbGDqvNW2+QdJSK9ScdjVVwcvg/f04X7fO+TXi845qJSihBaCsHfXjcNPxzKvdWaMarGI39RrZnSMtkOhyAzl7TqJHX6zx0sh7M2+JUc8QUOWz9kkBa+MD5kX5k1zY+4vGnpzzNDqvsQAnVEdVnkdQ77uAw1uZ+Ksd/n9MF8CDN3qWxwXn04aRamK4zBQoR6J1Zj6PxJQisgAM4uKgYl9IpPzJ2UQUtCWl0r8FJvwVjAqUO32Cf8i1NOaGL7zt0ESbTV4cXyZCQI3GXym+RsuxGgoBP1XJiKgag5EO3hRbXU1zq4+XI/3AJMO2667vlDBTJ+Tc63sGwAbET52lZjwExGhWgI3A285fPshW6jVlEBhRzQa8A0IuVP0xeiWyHhCq03dk8xZi9S4cP/ZbM5wW6C0xAL2EAzQkBVxN68I8Ipg5hjC/du+T3rVLcvOC6po47CRGZLMRBNEvE88Ke76Em8N4T1mfI/joQpvFXAhwXVFdQcSW7yofNW2VCfFlglBWSFuM2o/4M980qj3373AcM9bb55eRxcKGbHy0KsX2nl25LArkmapNyzYtmFMxrAM+dEZ/nq+vCvpbWKA=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1717063070; cv=none; b=g8XpyHveUGlxlHOxnq5OmaaoDZ46MuIEahJ11DAs4zci9t2Gm/ZglPKzg4z+AY049a18WOwF0e5NRPdIbfSi823U/u3zlI/JotR2kBsNhwGhbh9doKe/dUAilTk0FolWB3QkcLzZaNqdAaEFBrOOxxiDCIO3d1MAoxsG5WcUPznRlt20qS7ZgqbC/LhzZqqeOVieErB6ZGr/amthatj37i3H1osahKdhG5GKzDqK8ggzrNKn8OIpW2F35yhpk1R1oD2hZcPu2gdFguuCVyWJ+kjKedfxGAzRjfbZsnTVrRyDrsnXsAu8mUK+PL2CqyR7+HCa9qizhgO0H2K8Ml78EOnC6bOo7k8TPd0Baq9VeCDXSqg1aIL2+aTnaHMYCtw96zt588MAP7V1dKv/XTyynsYc5/uadM0CvhGZrD75L+61RtmUhz3p2TeYmd+nudcMaz0LmZvnwY7Dj6/2Ijg+ZFBDynsYG8Snb3elVF3v49CX9/iiiWZT7iJsTVj7D9QU/LJGGVB4zM6fC5lnQcdYpAvz/bAtje+BCruge390cB1Ac0AR1tjV93algMRVpbYm+f62IVd3kE1QrlQT7zA9V0Rlm0E/072j7fsG58CyYxBCSsAqfhVrWlWrcWH2Mxq/WyRn0qLJYlyP25aDAdfaYI/BsfgyX6y+0Syhwy59BRw=
- Authentication-results: smail; dmarc=none header.from=math.u-bordeaux.fr
- Authentication-results: smail; arc=none
- Delivery-date: Thu, 30 May 2024 11:57:54 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1717063070; bh=PDz2pubH72kkQWQd/rAajXRxqHdt74hGAJqd4cj9pro=; h=Date:From:To:Subject:References:In-Reply-To:From; b=ks2/wMqtZM7ucQ3W/qxtN5YkOzWdlnGgYARNGEtC5IMKugtqwh70RDiAqcMaK/jtN MRCqeUMJZYzRZ3VMsHVhgEX+ukTbuSieEoDEC55SFkDZDvmZCmbsTb+1z3AMnxFL3t nkPODSqWuvZETOvu9KnKpihTLlRWWSV1M5ZSoQNj8G0uZAFt9hhWYK+J46nGfS0WsX OyRlXu0rD7s7FFuJyGPdV/df0ffziV5MDM6oFVbPt9lwAJ3ZmAKfnh11EXGsPdCJQC iwNbVFiO15Fm5Pn2LzQ8LE+i7rqE31H9M5rM6/RgGH+GsZYQuig+2Hk4gmyNaccRdt XVpIp+9OrO7hBhKOztEyoz9NvzcvHsSAoEBNxNZC9iAFkfkKYbCApb8CLOiKpkmV0K Nr/615gpsj2JxLtQVTzndiB5ROEhqfXeXQxAXouDkrBMuhB+pqas10EoAlcVOFBVJL KgGo1GhP8K8ZXeG35OpEhh48I2Lz7zdFDjN09rrHbXiFCgoEBO2kxMhk1qc6h+ocDn WklJUc41Wbth0KuWIlPUNRY/bvJHt3IrF3a4NyrrgydCEg2dcTYbc+zQClre70vLxa uqiLuubpg9cX5XRNdORhHaRHQGJZSG/c8VEKipb452tmODh4WC23x2f6K2cW9LP+l8 bVBRU0V+2jUzT2GkUXZjemuM=
- In-reply-to: <Zle2v0vjLJ4fXhrI@debian.attlocal.net>
- Mail-followup-to: pari-dev@pari.math.u-bordeaux.fr
- References: <ZkAyF4s7OuJNURgh@debian.attlocal.net> <ZkB2PhK9xc/xXjk4@math.u-bordeaux.fr> <Zle2v0vjLJ4fXhrI@debian.attlocal.net>
On Wed, May 29, 2024 at 04:14:07PM -0700, Ilya Zakharevich wrote:
> Additionally, I have no clue what alias() is actually doing. For
Think
#define SIN sin
> example, is
> alias(SIN, sin)
> a “glorified version” of SIN = sin, or of SIN = builtin::sin? What
No.
When you do sin (without () ) in GP it need to generate a GP closure that emulate
the C function interface.
install(closure_disassemble,vG,disassemble)
? disassemble(sin)
00001 checkargs 0x1
00002 precreal
00003 callgen2 sin
? disassemble(x->sin(x))
00001 getargs 1
00002 pushlex -1
00003 precreal
00004 callgen2 sin
? Sin=sin
%2 = sin
? disassemble(x->Sin(x))
00001 getargs 1
00002 pushdyn Sin
00003 pushlex -1
00004 calluser 1
? alias(SIN,sin)
? disassemble(x->SIN(x))
00001 getargs 1
00002 pushlex -1
00003 precreal
00004 callgen2 sin
? for(i=1,10^7,sin(0))
? ##
*** last result computed in 556 ms.
? for(i=1,10^7,Sin(0))
? ##
*** last result computed in 845 ms.
? for(i=1,10^7,SIN(0))
? ##
*** last result computed in 554 ms.
> about
> alias(SIN, "sin")
Same as alias(SIN, sin)
> ? Or: is
> Sin = sin; alias(SIN, Sin)
> (ALWAYS) the same as alias(SIN, sin) ?
No.
Cheers,
Bill.