Post Reply 
lambertw, all branches
01-21-2024, 10:06 PM
Post: #30
RE: lambertw, all branches
(01-21-2024 08:39 PM)Gil Wrote:  Suppose that k=0, s=(+1.E-100-i.0000000001).
—> abs(a) < 0.6

You misread W0 guess formula:

< if k==0 then x = I.abs(a+1)<.6 and T/2 or I.log1p(a) end

BTW, why did you pick this? The other version so much simpler!

> if k==0 then x = I.log1p(2*a)/2 end"

Quote:Then initial xo = T/2.
Could you give the different step to find the value of T/2?
I found, for xo =T/2, pi/4× PI, but that value leads to endless loops on my program, whereas xo =ln(1+a) gives the expected result.

For k=0, I.W code assumed a imag part positive (conj to positive if not true)

Python code does not do flips, perhaps you should use that as guide.
Python version (no flip arguments, no signed zero):

T = mpc(0,2*k*pi+arg(a)) = mpc(0, arg(a)) ≈ -pi/2*I
T/2 ≈ -pi/4*I

Of course, this is not applicable for x guess.

Quote:for the other case k=0, a=(-.1,+i×1.E-100),
though abs(a) <0.6,
I tried as the above mentioned case,
xo=ln(1+a),
but then I got endless loops.
What would be the correct step to find here also T/2.

Same issue, abs(a+1), not abs(a)

T = mpc(0,2*k*pi+arg(a)) = mpc(0, arg(a)) ≈ pi*I
T/2 ≈ pi/2*I

Again, this is not applicable for x guess.

To experiment, I patched I.W to allow user supplied guess. I don't see problem with log1p(a)

lua> a = I(-.1, 1e-100)

lua> I.W(a, 0, I.log1p(a))
(-0.1053605156578263+1.1111111111111111e-100*I)
(-0.11161906744205385+1.1848854610650873e-100*I)
(-0.11183232962808998+1.187433773120638e-100*I)
(-0.11183255915869776+1.1874365171431567e-100*I)
(-0.11183255915896298+1.1874365171463274e-100*I)
(-0.11183255915896298+1.2591382437197292e-100*I)

As expected, I.log1p(2a)/2 ≈ a-a*a is better, matching W0(a) taylor series.

lua> I.W(a, 0, I.log1p(2*a)/2)
(-0.11157177565710488+1.25e-100*I)
(-0.1118322166456466+1.2532842987580516e-100*I)
(-0.11183255915837244+1.2532886205550325e-100*I)
(-0.11183255915896304+1.2532886205624847e-100*I)
(-0.11183255915896297+1.259138243719729e-100*I)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
lambertw, all branches - Albert Chan - 04-07-2023, 01:24 PM
RE: lambertw, all branches - Albert Chan - 04-07-2023, 02:47 PM
RE: lambertw, all branches - Albert Chan - 04-19-2023, 01:30 AM
RE: lambertw, all branches - pier4r - 04-07-2023, 06:04 PM
RE: lambertw, all branches - Albert Chan - 04-07-2023, 07:54 PM
RE: lambertw, all branches - Albert Chan - 04-08-2023, 03:21 PM
RE: lambertw, all branches - Albert Chan - 04-08-2023, 05:54 PM
RE: lambertw, all branches - Albert Chan - 04-07-2023, 08:40 PM
RE: lambertw, all branches - Albert Chan - 04-09-2023, 03:59 AM
RE: lambertw, all branches - Albert Chan - 04-09-2023, 04:36 PM
RE: lambertw, all branches - Albert Chan - 04-10-2023, 04:44 PM
RE: lambertw, all branches - Albert Chan - 04-10-2023, 06:47 PM
RE: lambertw, all branches - Albert Chan - 04-13-2023, 03:03 PM
RE: lambertw, all branches - floppy - 04-13-2023, 04:14 PM
RE: lambertw, all branches - Albert Chan - 04-23-2023, 02:49 PM
RE: lambertw, all branches - Albert Chan - 04-23-2023, 04:40 PM
RE: lambertw, all branches - Albert Chan - 01-19-2024, 04:14 PM
RE: lambertw, all branches - Albert Chan - 01-20-2024, 04:48 PM
RE: lambertw, all branches - Gil - 01-20-2024, 10:52 PM
RE: lambertw, all branches - Albert Chan - 01-21-2024, 01:14 AM
RE: lambertw, all branches - Albert Chan - 01-21-2024, 01:54 AM
RE: lambertw, all branches - Gil - 01-21-2024, 01:53 PM
RE: lambertw, all branches - Albert Chan - 01-21-2024, 04:19 PM
RE: lambertw, all branches - Gil - 01-21-2024, 04:35 PM
RE: lambertw, all branches - Albert Chan - 01-21-2024, 06:03 PM
RE: lambertw, all branches - Albert Chan - 01-21-2024, 07:01 PM
RE: lambertw, all branches - Gil - 01-21-2024, 07:30 PM
RE: lambertw, all branches - Gil - 01-21-2024, 08:39 PM
RE: lambertw, all branches - Albert Chan - 01-21-2024 10:06 PM
RE: lambertw, all branches - Gil - 01-21-2024, 09:51 PM
RE: lambertw, all branches - Gil - 01-21-2024, 10:56 PM
RE: lambertw, all branches - Albert Chan - 01-22-2024, 01:34 AM
RE: lambertw, all branches - Gil - 01-21-2024, 11:15 PM
RE: lambertw, all branches - Gil - 01-22-2024, 06:09 PM
RE: lambertw, all branches - Albert Chan - 01-22-2024, 07:29 PM
RE: lambertw, all branches - Gil - 01-22-2024, 11:33 PM
RE: lambertw, all branches - Albert Chan - 01-23-2024, 02:32 AM
RE: lambertw, all branches - Gil - 01-23-2024, 02:35 PM
RE: lambertw, all branches - Albert Chan - 01-23-2024, 03:54 PM
RE: lambertw, all branches - Gil - 01-23-2024, 04:57 PM
RE: lambertw, all branches - Albert Chan - 01-23-2024, 06:17 PM
RE: lambertw, all branches - Gil - 01-23-2024, 06:44 PM
RE: lambertw, all branches - Gil - 01-23-2024, 11:00 PM
RE: lambertw, all branches - Gil - 01-24-2024, 03:18 PM
RE: lambertw, all branches - Albert Chan - 01-24-2024, 08:53 PM
RE: lambertw, all branches - Gil - 01-25-2024, 12:37 AM
RE: lambertw, all branches - Gil - 01-25-2024, 01:10 AM
RE: lambertw, all branches - Gil - 01-25-2024, 03:04 AM
RE: lambertw, all branches - Albert Chan - 01-25-2024, 07:02 AM
RE: lambertw, all branches - Gil - 01-25-2024, 10:09 AM
RE: lambertw, all branches - Albert Chan - 01-25-2024, 04:13 PM
RE: lambertw, all branches - Gil - 01-25-2024, 05:14 PM
RE: lambertw, all branches - Albert Chan - 01-25-2024, 05:57 PM
RE: lambertw, all branches - Gil - 01-25-2024, 06:19 PM
RE: lambertw, all branches - Albert Chan - 01-28-2024, 11:18 PM
RE: lambertw, all branches - Albert Chan - 02-01-2024, 02:17 AM
RE: lambertw, all branches - Albert Chan - 02-01-2024, 04:16 PM
RE: lambertw, all branches - Albert Chan - 02-02-2024, 11:49 AM



User(s) browsing this thread: 1 Guest(s)