Jmat.Real.lambertw, newton loop step

Specification

?
\[\begin{array}{l} \\ \begin{array}{l} t_0 := wj \cdot e^{wj}\\ wj - \frac{t\_0 - x}{e^{wj} + t\_0} \end{array} \end{array} \]
(FPCore (wj x)
 :precision binary64
 (let* ((t_0 (* wj (exp wj)))) (- wj (/ (- t_0 x) (+ (exp wj) t_0)))))
double code(double wj, double x) {
	double t_0 = wj * exp(wj);
	return wj - ((t_0 - x) / (exp(wj) + t_0));
}
real(8) function code(wj, x)
    real(8), intent (in) :: wj
    real(8), intent (in) :: x
    real(8) :: t_0
    t_0 = wj * exp(wj)
    code = wj - ((t_0 - x) / (exp(wj) + t_0))
end function
public static double code(double wj, double x) {
	double t_0 = wj * Math.exp(wj);
	return wj - ((t_0 - x) / (Math.exp(wj) + t_0));
}
def code(wj, x):
	t_0 = wj * math.exp(wj)
	return wj - ((t_0 - x) / (math.exp(wj) + t_0))
function code(wj, x)
	t_0 = Float64(wj * exp(wj))
	return Float64(wj - Float64(Float64(t_0 - x) / Float64(exp(wj) + t_0)))
end
function tmp = code(wj, x)
	t_0 = wj * exp(wj);
	tmp = wj - ((t_0 - x) / (exp(wj) + t_0));
end
code[wj_, x_] := Block[{t$95$0 = N[(wj * N[Exp[wj], $MachinePrecision]), $MachinePrecision]}, N[(wj - N[(N[(t$95$0 - x), $MachinePrecision] / N[(N[Exp[wj], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := wj \cdot e^{wj}\\
wj - \frac{t\_0 - x}{e^{wj} + t\_0}
\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024257 
(FPCore (wj x)
  :name "Jmat.Real.lambertw, newton loop step"
  :precision binary64

  :alt
  (! :herbie-platform default (let ((ew (exp wj))) (- wj (- (/ wj (+ wj 1)) (/ x (+ ew (* wj ew)))))))

  (- wj (/ (- (* wj (exp wj)) x) (+ (exp wj) (* wj (exp wj))))))

Please file a bug report with this information.

Backtrace

first: contract violation expected: (and/c list? (not/c empty?)) given: #fLC
run-egg/home/nightlies/herbie/eclass-test-rev/src/core/egg-herbie.rkt11790
simplify-batch/home/nightlies/herbie/eclass-test-rev/src/core/simplify.rkt210
(unnamed)/usr/local/racket/collects/racket/contract/private/arrow-higher-order.rkt37933
lower-approximations/home/nightlies/herbie/eclass-test-rev/src/core/patch.rkt200
generate-candidates/home/nightlies/herbie/eclass-test-rev/src/core/patch.rkt1450
run-iter!/home/nightlies/herbie/eclass-test-rev/src/core/mainloop.rkt660
run-improve!/home/nightlies/herbie/eclass-test-rev/src/core/mainloop.rkt430
get-alternatives/report/home/nightlies/herbie/eclass-test-rev/src/api/sandbox.rkt1870
(unnamed)/home/nightlies/herbie/eclass-test-rev/src/api/sandbox.rkt2836
(unnamed)/usr/local/racket/share/pkgs/profile-lib/main.rkt4010
profile-thunk/usr/local/racket/share/pkgs/profile-lib/main.rkt90
(unnamed)/usr/local/racket/collects/racket/engine.rkt4224