lambertw, all branches
|
02-02-2024, 11:49 AM
Post: #58
|
|||
|
|||
RE: lambertw, all branches
(02-01-2024 04:16 PM)Albert Chan Wrote: Previous post customized LN and ability to enter W guess also included. Python W nudge imag part from inside LN, because it is free. Customized LN need to fix ±0j effect to phase angle anyway. Lua I.W (post 14) work differently, by forcing positive x imag part, with "flips" The reason is signed-zero arithmetic preferred +0. It is much easier to maintain +0 than -0. If I were to implement equivalent safe feature, I would just force this for each iteration. This is a safe patch, since it is what is assumed. Just place it before Newton correction. Code: x = I(I.real(x), abs(I.imag(x))) For the ability to user to enter W guess, add this before Newton loops. Code: if verbal and verbal~=true then x = flip(verbal) end With these patches to post 14, this is Lua I.W version 4 The patch does not mean we can use any guess. The problem is again ±0*I, with negative real part. We get phase angle of ±pi, difference of ±2*pi, exactly matched branch ±1 This is why branch 0, ±1 with small imag parts *must* have good guess. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)