Bill Allombert on Sat, 25 Mar 2023 23:29:13 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: from t_POL to t_CLOSURE (and back)
|
- To: pari-users@pari.math.u-bordeaux.fr
- Subject: Re: from t_POL to t_CLOSURE (and back)
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Sat, 25 Mar 2023 23:27:58 +0100
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1679783273; c=relaxed/relaxed; bh=OLi4HQRlHuVYi/DZfMYvliU78pCeSiOHHF+7sbTnYNg=; h=DKIM-Signature:Date:From:To:Subject:Message-ID:Mail-Followup-To: References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; b=4QIYuzX5u4SQztyFl0ivYW01+/kawfUXpioegIKyHn7QEeKXzp0vuXgNst74JDFTavq1OxCWl3hdI73ncwKd+wUVdRiJPCT2NeOvV9wOj+IwjXMzOV5Yj5cLANEmJ77AvshlUbb1FVKtIpLcF9gTeLmvuTeZy0MvEHKNyMrF+JlXPAUL1VwdOoVTuMCtab/mvCDvJQkYdWdM2jjd9M3z3yuGiGpQH3ZjcDi5J//j9ilsmXkshw5tihfBPiaAJoZdBv+y5ZU1baqWZt/iXtFlNbXgZ9GMMQkE4KplC3xVvXeE5a8Sx1DfMcUZ6BFmWJTZYvFKzdBxP5st6LusQWzn5bPhB6MOUb0g9yWjD+oZ+8GmpT5l/iul3UafmrsWzl6L9VnK4BxF176Pqv/LF8dLaPax5UL3VJzJA5b33rOyc62URU6J9Bbrgh5b6v7eEXKKzw1KqFZtulO2NTKzzeeESPvAQaVLitJtvyHkJfDxsiKl7YEmKnWKOoUf8kF1hV+Aw6dlXHWFLyGdAddDdJ5i+MU9T9em/3tXnBIFdilCuSncW+ZzgwMXsU/KOSw0auFKVYzpD306eRLrC8vmSw2kxz7CPNljTswcfrXkGF6PDFN/cJSs8xo+poXWk7hlC+ZOoH7HdEQUd5AfsgpAAzAfzE64Dbkr5fWW1QymKzgNkGo=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1679783273; cv=none; b=iExUAzXCGp1R5yz7kt87BL0iMJeJxxnK6JpCYX64fcFR7xlUFYseOuyHq0BgEwfonCaIoovSEOD+3Wrk5DrOmOWXNh+AfXaeMMe1VGw0rufWiCsT5wf82H4rr0AgOO1yi7OIMwLN5kR2rkrNBvy/Vul+3QdZCn2xVSSqLod7WektsxJg08WmyBvZSlxmwnrK//P/Fhtuunzm7ADVjA0l+DMWAdGVZ4EurXraxBGOCP2WCEQwqBal/KQUOGKaGwHocX0PQGfGcv6LLXC2Efk8qimYNYGnMOTf3/6HShwVsWK1ezMv51lH0j7kR3UWw7y1MHm8R4VRnP8z9FrZqPPUkmdhqOQMAPg0KjTe2Dh0DsBL6oQHNVQ2Wfzmg3htm7fZATz4eS7bQj2xosGw2BfKdNwNFHKoAZnF0SLcyYo+70ZHmdKL0kRGUuWE2CYR5lC/4YCB9AuEv5XTPnypSmuoFP5nBKp6K5R6QMJ9XhKcsLXaokJmWUuRms/5v3ENSqx5PGDxtyLxTrD/iNyH4CHXlCmJ/TljRt7l+Og3UcbdOyK2WatA32UFnMdCZnURry+id0leVUPSlg2eCeznrI26hLmmaE8Il0EP5a+y3K6TYzeGT74kU+9QMWbhtHEzTD9dINkMaF8jpQW8AtfrZQcXLHikfdNW09l95u1Esio7erI=
- Authentication-results: smail; arc=none
- Delivery-date: Sat, 25 Mar 2023 23:29:13 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1679783273; bh=OLi4HQRlHuVYi/DZfMYvliU78pCeSiOHHF+7sbTnYNg=; h=Date:From:To:Subject:References:In-Reply-To:From; b=ASvby4PxRDoD5JlSXBr3m6fbH6TNCPIKjPTZVTj2ewRbjhnc50z/VopXTSUo3Smtu b3tz0zAaVeyjuF23MnRLuHhlUnMZGjKd57hiSoFsMH6rrsWivF/X8U6sd59KswMcKj B60nFLq+Aqeo6hAmaP+SqBzWm3kZvW5TJ4kdZ/wbp0x6JhA+c21nKAr4GiC/QUU/6P RFeT3wQHpGMl8ujAswfiTIvQu3+GBvmr4KsyZWkFY+PvdS8yhX/UcHZaxF/ly40uHL pDd072bXCBrRSOVCet3Jrk26rFGhKSZo0SvJb0Gnbx/7mOVKSdEnomn7eeuYfMnJUi AEswGAyMNTUZTMQ5iVnArpMr16K6Bn468VQ81bXBmEJu7KwaZTYixTC2PdDCxbM1EH Fi/ZyB4dL5/WsLrEvNVF+n0YoTax96nnkvTxkS6M109lOkHAxnBGaampw44sLTz/rb X0JXUy0azBXJbgGhYcRVirBcTgf4vRW+1AJfiUlFSbs4+UT97zfFnBFc7yZw1E90ll /9RDRw35O+nR0binBNzdPv5cmAtUi8U+Y0RhQVf+MgjHuGS5xTGu3ltLlD5pqtQ1ZT 3QAOfNOV8OR9+s49I8UZ5QEBHumn4Aa2qvZ0OgLesQarH2rK+T7yiQxdikIBdtQUrz vYpfq4EoWBfFfnG7oJo6a+tM=
- In-reply-to: <CAJkPp5POGV5=LmFOTWr0f+-vgDANnsE6A6ot06YouUqxf7njYg@mail.gmail.com>
- Mail-followup-to: pari-users@pari.math.u-bordeaux.fr
- References: <CAJkPp5POGV5=LmFOTWr0f+-vgDANnsE6A6ot06YouUqxf7njYg@mail.gmail.com>
On Sat, Mar 25, 2023 at 05:54:10PM -0400, Max Alekseyev wrote:
> Is there any more straightforward/logical way than the following?
>
> ? p = x^3 + x + 1
> %1 = x^3 + x + 1
> ? type(p)
> %2 = "t_POL"
> ? f = z -> subst(p,variable(p),z)
> %3 = (z)->subst(p,variable(p),z)
> ? type(f)
> %4 = "t_CLOSURE"
> ? q = f('x)
> %5 = x^3 + x + 1
> ? type(q)
> %6 = "t_POL"
I do not know what is more straightforward/logical, but you can do
f(x)=eval(p)
Cheers,
Bill