\[wj - \frac{wj \cdot e^{wj} - x}{e^{wj} + wj \cdot e^{wj}}\]
Test:
Jmat.Real.lambertw, newton loop step
Bits:
128 bits
Bits error versus wj
Bits error versus x
Time: 4.4 s
Input Error: 29.9
Output Error: 0.0
Log:
Profile: 🕒
\(x + {wj}^2\)
  1. Started with
    \[wj - \frac{wj \cdot e^{wj} - x}{e^{wj} + wj \cdot e^{wj}}\]
    29.9
  2. Applied taylor to get
    \[wj - \frac{wj \cdot e^{wj} - x}{e^{wj} + wj \cdot e^{wj}} \leadsto wj - \left(wj - \left({wj}^2 + x\right)\right)\]
    8.5
  3. Taylor expanded around 0 to get
    \[wj - \color{red}{\left(wj - \left({wj}^2 + x\right)\right)} \leadsto wj - \color{blue}{\left(wj - \left({wj}^2 + x\right)\right)}\]
    8.5
  4. Applied simplify to get
    \[\color{red}{wj - \left(wj - \left({wj}^2 + x\right)\right)} \leadsto \color{blue}{x + {wj}^2}\]
    0.0

Original test:


(lambda ((wj default) (x default))
  #:name "Jmat.Real.lambertw, newton loop step"
  (- wj (/ (- (* wj (exp wj)) x) (+ (exp wj) (* wj (exp wj)))))
  #:target
  (- wj (- (/ wj (+ wj 1)) (/ x (+ (exp wj) (* wj (exp wj)))))))