(07/19/2022, 09:01 AM)JmsNxn Wrote: If you can point me to some pari-gp code which does this, Gottfried. THANK YOU!
PLEASE TELL ME THIS IS POSSIBLE!!!
See this Pari/GP-source of Mike3 in the attachment. I've slightly adapted to fit my environment of Pari/GP-functions, and hope I'd removed that references to my private environment properly.
Please tell me if something does not work.
- - - - - - - - - -
Additionally, this is what Pari/GP (alpha version 2.14) tells us about "lambertw":
Code:
lambertw(y,{branch=0}): solution of the implicit equation x*exp(x)=y. In the
p-adic case, gives a solution of x*exp(x)=y if x has positive valuation, of
x+log(x)=log(y) otherwise.using version
Code:
\v
GP/PARI CALCULATOR Version 2.14.0 (development 27026-bc08af1825)
amd64 running mingw (x86-64/GMP-6.1.2 kernel) 64-bit version
compiled: Oct 25 2021, gcc version 8.3-win32 20190406 (GCC)
threading engine: single
(readline v8.0 disabled, extended help enabled)- - - - - - - -
One more point
I see you're discussing \(b = y^{1/y} \) in context of multiple fixpoints.
Are you aware that for multiple fixpoints \(t_k\) with property \( e^{t_k} = t_k \) we must write \( e= t_k^{1/(t_k+k\cdot 2 \pi î)} \) ? (where the reference to the branch index must occur in the exponent in the rhs) See the protocol using Mike's LambertW: (update: Pari/GP V 2.14 woks identically, calling "lambertw()" instead)
Code:
bb = exp(1)
k=-1; tk=(exp(-LambertW(-log(bb),k))); [bb^tk,tk ; bb,tk^(1/(tk+k*2*Pi*I))]
%298 =
[0.318131505205 + 1.33723570143*I 0.318131505205 + 1.33723570143*I] \\ OK
[ 2.71828182846 0.764563417922 + 0.0623544878074*I] \\ ERR: at k=-1 the branchindex in exponent must be chose to be zero!!
k=-1; tk=(exp(-LambertW(-log(bb),k))); [bb^tk,tk ; bb,tk^(1/(tk+0*k*2*Pi*I))] \\OK: at k=-1 the branchindex in exponent must be chose to be zero!!
%300 =
[0.318131505205 + 1.33723570143*I 0.318131505205 + 1.33723570143*I] \\OK
[ 2.71828182846 2.71828182846 + 9.21798806441 E-810*I] \\OK: at k=-1 the branchindex in exponent must be chose to be zero!!
k=0; tk=(exp(-LambertW(-log(bb),k))); [bb^tk,tk ; bb,tk^(1/(tk+k*2*Pi*I))]
%302 =
[0.318131505205 - 1.33723570143*I 0.318131505205 - 1.33723570143*I] \\ OK
[ 2.71828182846 2.71828182846 - 9.21798806441 E-810*I] \\ OK
k=1; tk=(exp(-LambertW(-log(bb),k))); [bb^tk,tk ; bb,tk^(1/(tk+k*2*Pi*I))]
%304 =
[2.06227772960 - 7.58863117847*I 2.06227772960 - 7.58863117847*I] \\ OK
[ 2.71828182846 2.71828182846 + 0.E-809*I] \\ OK
k=2; tk=(exp(-LambertW(-log(bb),k))); [bb^tk,tk ; bb,tk^(1/(tk+k*2*Pi*I))]
%306 =
[2.65319197404 - 13.9492083345*I 2.65319197404 - 13.9492083345*I] \\ OK
[ 2.71828182846 2.71828182846 + 4.79335379349 E-808*I] \\ OK- - - - - - - - - - -
FInal remark: it comes out that the following Pari/GP-call is always correct:
Code:
k=-12 \\ init k with wanted branch-index
t_k= exp( - lambertw(-log(bb),k) ) \\ "lambertw()" with branching only available in Pari/GP v. 2.14 - otherwise use Mike's implementation
print ( [bb, k, t_k, t_k^(1/ ( t_k+ (k + (k<0))*2*Pi*I ) ) ])
[2.71828182846, -12, 4.25920785594 + 70.6256008021*I, 2.71828182846 + 1.36057503831 E-806*I]For other bases, for instance \( bb=12 \) we first compute \( \lambda = \log(bb) \) and then
Code:
[bb=12, lam = log(bb)]
{for(k=-3,3,
tt=exp(-LambertW(-lam,k));
print("--- ",k," ---");
printp( mytrunc( [bb^tt ; tt] ) ); \\ "mytrunc()" is userdefined truncation-procedure, to set spurious real or imag values to zero
printp( mytrunc( [bb ; tt^(1/(tt+(k+(k<0))*2*Pi*I/lam)) ]) );
)}Gottfried
------------------------------------------------
How to get Pari/GP v 2.14 (development version)
https://pari.math.u-bordeaux.fr/download.html
"Daily Snapshots (32-bit, 64-bit): basic GP binaries built daily from the master branch. Bleeding edge ! "
https://pari.math.u-bordeaux.fr/pub/pari...latest.exe
https://pari.math.u-bordeaux.fr/pub/pari...latest.exe
Gottfried Helms, Kassel

