
(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}
Sampling outcomes in binary64 precision:
Herbie found 13 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(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}
(FPCore (wj x)
:precision binary64
(if (<= wj -1.28e-8)
(+ wj (/ (- x (* wj (exp wj))) (* (exp wj) (+ wj 1.0))))
(if (<= wj 2.6e-9)
(- (fma wj wj x) (pow wj 3.0))
(- wj (/ (- wj (/ x (exp wj))) (+ wj 1.0))))))
double code(double wj, double x) {
double tmp;
if (wj <= -1.28e-8) {
tmp = wj + ((x - (wj * exp(wj))) / (exp(wj) * (wj + 1.0)));
} else if (wj <= 2.6e-9) {
tmp = fma(wj, wj, x) - pow(wj, 3.0);
} else {
tmp = wj - ((wj - (x / exp(wj))) / (wj + 1.0));
}
return tmp;
}
function code(wj, x) tmp = 0.0 if (wj <= -1.28e-8) tmp = Float64(wj + Float64(Float64(x - Float64(wj * exp(wj))) / Float64(exp(wj) * Float64(wj + 1.0)))); elseif (wj <= 2.6e-9) tmp = Float64(fma(wj, wj, x) - (wj ^ 3.0)); else tmp = Float64(wj - Float64(Float64(wj - Float64(x / exp(wj))) / Float64(wj + 1.0))); end return tmp end
code[wj_, x_] := If[LessEqual[wj, -1.28e-8], N[(wj + N[(N[(x - N[(wj * N[Exp[wj], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Exp[wj], $MachinePrecision] * N[(wj + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[wj, 2.6e-9], N[(N[(wj * wj + x), $MachinePrecision] - N[Power[wj, 3.0], $MachinePrecision]), $MachinePrecision], N[(wj - N[(N[(wj - N[(x / N[Exp[wj], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(wj + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;wj \leq -1.28 \cdot 10^{-8}:\\
\;\;\;\;wj + \frac{x - wj \cdot e^{wj}}{e^{wj} \cdot \left(wj + 1\right)}\\
\mathbf{elif}\;wj \leq 2.6 \cdot 10^{-9}:\\
\;\;\;\;\mathsf{fma}\left(wj, wj, x\right) - {wj}^{3}\\
\mathbf{else}:\\
\;\;\;\;wj - \frac{wj - \frac{x}{e^{wj}}}{wj + 1}\\
\end{array}
\end{array}
if wj < -1.28000000000000005e-8Initial program 63.8%
distribute-rgt1-in81.4%
*-commutative81.4%
Simplified81.4%
if -1.28000000000000005e-8 < wj < 2.6000000000000001e-9Initial program 79.1%
distribute-rgt1-in79.1%
associate-/l/79.1%
div-sub79.1%
associate-/l*79.1%
*-inverses79.1%
/-rgt-identity79.1%
Simplified79.1%
Taylor expanded in wj around 0 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in x around 0 99.4%
+-commutative99.4%
neg-mul-199.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in x around 0 99.4%
+-commutative99.4%
unpow299.4%
fma-def99.4%
Simplified99.4%
if 2.6000000000000001e-9 < wj Initial program 65.9%
distribute-rgt1-in65.7%
associate-/l/65.7%
div-sub65.7%
associate-/l*65.7%
*-inverses95.7%
/-rgt-identity95.7%
Simplified95.7%
Final simplification98.8%
(FPCore (wj x)
:precision binary64
(let* ((t_0 (* wj (exp wj))) (t_1 (+ (* x -4.0) (* x 1.5))))
(if (<= (+ wj (/ (- x t_0) (+ (exp wj) t_0))) 5e-18)
(+
x
(+
(* -2.0 (* wj x))
(+
(*
(pow wj 3.0)
(- -1.0 (+ (* x -3.0) (+ (* -2.0 t_1) (* x 0.6666666666666666)))))
(* (pow wj 2.0) (- 1.0 t_1)))))
(- wj (/ (- wj (/ x (exp wj))) (+ wj 1.0))))))
double code(double wj, double x) {
double t_0 = wj * exp(wj);
double t_1 = (x * -4.0) + (x * 1.5);
double tmp;
if ((wj + ((x - t_0) / (exp(wj) + t_0))) <= 5e-18) {
tmp = x + ((-2.0 * (wj * x)) + ((pow(wj, 3.0) * (-1.0 - ((x * -3.0) + ((-2.0 * t_1) + (x * 0.6666666666666666))))) + (pow(wj, 2.0) * (1.0 - t_1))));
} else {
tmp = wj - ((wj - (x / exp(wj))) / (wj + 1.0));
}
return tmp;
}
real(8) function code(wj, x)
real(8), intent (in) :: wj
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = wj * exp(wj)
t_1 = (x * (-4.0d0)) + (x * 1.5d0)
if ((wj + ((x - t_0) / (exp(wj) + t_0))) <= 5d-18) then
tmp = x + (((-2.0d0) * (wj * x)) + (((wj ** 3.0d0) * ((-1.0d0) - ((x * (-3.0d0)) + (((-2.0d0) * t_1) + (x * 0.6666666666666666d0))))) + ((wj ** 2.0d0) * (1.0d0 - t_1))))
else
tmp = wj - ((wj - (x / exp(wj))) / (wj + 1.0d0))
end if
code = tmp
end function
public static double code(double wj, double x) {
double t_0 = wj * Math.exp(wj);
double t_1 = (x * -4.0) + (x * 1.5);
double tmp;
if ((wj + ((x - t_0) / (Math.exp(wj) + t_0))) <= 5e-18) {
tmp = x + ((-2.0 * (wj * x)) + ((Math.pow(wj, 3.0) * (-1.0 - ((x * -3.0) + ((-2.0 * t_1) + (x * 0.6666666666666666))))) + (Math.pow(wj, 2.0) * (1.0 - t_1))));
} else {
tmp = wj - ((wj - (x / Math.exp(wj))) / (wj + 1.0));
}
return tmp;
}
def code(wj, x): t_0 = wj * math.exp(wj) t_1 = (x * -4.0) + (x * 1.5) tmp = 0 if (wj + ((x - t_0) / (math.exp(wj) + t_0))) <= 5e-18: tmp = x + ((-2.0 * (wj * x)) + ((math.pow(wj, 3.0) * (-1.0 - ((x * -3.0) + ((-2.0 * t_1) + (x * 0.6666666666666666))))) + (math.pow(wj, 2.0) * (1.0 - t_1)))) else: tmp = wj - ((wj - (x / math.exp(wj))) / (wj + 1.0)) return tmp
function code(wj, x) t_0 = Float64(wj * exp(wj)) t_1 = Float64(Float64(x * -4.0) + Float64(x * 1.5)) tmp = 0.0 if (Float64(wj + Float64(Float64(x - t_0) / Float64(exp(wj) + t_0))) <= 5e-18) tmp = Float64(x + Float64(Float64(-2.0 * Float64(wj * x)) + Float64(Float64((wj ^ 3.0) * Float64(-1.0 - Float64(Float64(x * -3.0) + Float64(Float64(-2.0 * t_1) + Float64(x * 0.6666666666666666))))) + Float64((wj ^ 2.0) * Float64(1.0 - t_1))))); else tmp = Float64(wj - Float64(Float64(wj - Float64(x / exp(wj))) / Float64(wj + 1.0))); end return tmp end
function tmp_2 = code(wj, x) t_0 = wj * exp(wj); t_1 = (x * -4.0) + (x * 1.5); tmp = 0.0; if ((wj + ((x - t_0) / (exp(wj) + t_0))) <= 5e-18) tmp = x + ((-2.0 * (wj * x)) + (((wj ^ 3.0) * (-1.0 - ((x * -3.0) + ((-2.0 * t_1) + (x * 0.6666666666666666))))) + ((wj ^ 2.0) * (1.0 - t_1)))); else tmp = wj - ((wj - (x / exp(wj))) / (wj + 1.0)); end tmp_2 = tmp; end
code[wj_, x_] := Block[{t$95$0 = N[(wj * N[Exp[wj], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x * -4.0), $MachinePrecision] + N[(x * 1.5), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(wj + N[(N[(x - t$95$0), $MachinePrecision] / N[(N[Exp[wj], $MachinePrecision] + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 5e-18], N[(x + N[(N[(-2.0 * N[(wj * x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[wj, 3.0], $MachinePrecision] * N[(-1.0 - N[(N[(x * -3.0), $MachinePrecision] + N[(N[(-2.0 * t$95$1), $MachinePrecision] + N[(x * 0.6666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[wj, 2.0], $MachinePrecision] * N[(1.0 - t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(wj - N[(N[(wj - N[(x / N[Exp[wj], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(wj + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := wj \cdot e^{wj}\\
t_1 := x \cdot -4 + x \cdot 1.5\\
\mathbf{if}\;wj + \frac{x - t\_0}{e^{wj} + t\_0} \leq 5 \cdot 10^{-18}:\\
\;\;\;\;x + \left(-2 \cdot \left(wj \cdot x\right) + \left({wj}^{3} \cdot \left(-1 - \left(x \cdot -3 + \left(-2 \cdot t\_1 + x \cdot 0.6666666666666666\right)\right)\right) + {wj}^{2} \cdot \left(1 - t\_1\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;wj - \frac{wj - \frac{x}{e^{wj}}}{wj + 1}\\
\end{array}
\end{array}
if (-.f64 wj (/.f64 (-.f64 (*.f64 wj (exp.f64 wj)) x) (+.f64 (exp.f64 wj) (*.f64 wj (exp.f64 wj))))) < 5.00000000000000036e-18Initial program 72.0%
distribute-rgt1-in72.0%
associate-/l/72.0%
div-sub72.0%
associate-/l*72.0%
*-inverses72.0%
/-rgt-identity72.0%
Simplified72.0%
Taylor expanded in wj around 0 98.8%
if 5.00000000000000036e-18 < (-.f64 wj (/.f64 (-.f64 (*.f64 wj (exp.f64 wj)) x) (+.f64 (exp.f64 wj) (*.f64 wj (exp.f64 wj))))) Initial program 92.7%
distribute-rgt1-in94.0%
associate-/l/94.0%
div-sub92.7%
associate-/l*92.7%
*-inverses97.9%
/-rgt-identity97.9%
Simplified97.9%
Final simplification98.6%
(FPCore (wj x)
:precision binary64
(if (<= wj 3.6e-6)
(+
x
(+
(* -2.0 (* wj x))
(- (* (pow wj 2.0) (- 1.0 (+ (* x -4.0) (* x 1.5)))) (pow wj 3.0))))
(- wj (/ (- wj (/ x (exp wj))) (+ wj 1.0)))))
double code(double wj, double x) {
double tmp;
if (wj <= 3.6e-6) {
tmp = x + ((-2.0 * (wj * x)) + ((pow(wj, 2.0) * (1.0 - ((x * -4.0) + (x * 1.5)))) - pow(wj, 3.0)));
} else {
tmp = wj - ((wj - (x / exp(wj))) / (wj + 1.0));
}
return tmp;
}
real(8) function code(wj, x)
real(8), intent (in) :: wj
real(8), intent (in) :: x
real(8) :: tmp
if (wj <= 3.6d-6) then
tmp = x + (((-2.0d0) * (wj * x)) + (((wj ** 2.0d0) * (1.0d0 - ((x * (-4.0d0)) + (x * 1.5d0)))) - (wj ** 3.0d0)))
else
tmp = wj - ((wj - (x / exp(wj))) / (wj + 1.0d0))
end if
code = tmp
end function
public static double code(double wj, double x) {
double tmp;
if (wj <= 3.6e-6) {
tmp = x + ((-2.0 * (wj * x)) + ((Math.pow(wj, 2.0) * (1.0 - ((x * -4.0) + (x * 1.5)))) - Math.pow(wj, 3.0)));
} else {
tmp = wj - ((wj - (x / Math.exp(wj))) / (wj + 1.0));
}
return tmp;
}
def code(wj, x): tmp = 0 if wj <= 3.6e-6: tmp = x + ((-2.0 * (wj * x)) + ((math.pow(wj, 2.0) * (1.0 - ((x * -4.0) + (x * 1.5)))) - math.pow(wj, 3.0))) else: tmp = wj - ((wj - (x / math.exp(wj))) / (wj + 1.0)) return tmp
function code(wj, x) tmp = 0.0 if (wj <= 3.6e-6) tmp = Float64(x + Float64(Float64(-2.0 * Float64(wj * x)) + Float64(Float64((wj ^ 2.0) * Float64(1.0 - Float64(Float64(x * -4.0) + Float64(x * 1.5)))) - (wj ^ 3.0)))); else tmp = Float64(wj - Float64(Float64(wj - Float64(x / exp(wj))) / Float64(wj + 1.0))); end return tmp end
function tmp_2 = code(wj, x) tmp = 0.0; if (wj <= 3.6e-6) tmp = x + ((-2.0 * (wj * x)) + (((wj ^ 2.0) * (1.0 - ((x * -4.0) + (x * 1.5)))) - (wj ^ 3.0))); else tmp = wj - ((wj - (x / exp(wj))) / (wj + 1.0)); end tmp_2 = tmp; end
code[wj_, x_] := If[LessEqual[wj, 3.6e-6], N[(x + N[(N[(-2.0 * N[(wj * x), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[wj, 2.0], $MachinePrecision] * N[(1.0 - N[(N[(x * -4.0), $MachinePrecision] + N[(x * 1.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[Power[wj, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(wj - N[(N[(wj - N[(x / N[Exp[wj], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(wj + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;wj \leq 3.6 \cdot 10^{-6}:\\
\;\;\;\;x + \left(-2 \cdot \left(wj \cdot x\right) + \left({wj}^{2} \cdot \left(1 - \left(x \cdot -4 + x \cdot 1.5\right)\right) - {wj}^{3}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;wj - \frac{wj - \frac{x}{e^{wj}}}{wj + 1}\\
\end{array}
\end{array}
if wj < 3.59999999999999984e-6Initial program 78.8%
distribute-rgt1-in79.2%
associate-/l/79.3%
div-sub78.8%
associate-/l*78.8%
*-inverses79.3%
/-rgt-identity79.3%
Simplified79.3%
Taylor expanded in wj around 0 97.9%
Taylor expanded in x around 0 97.9%
if 3.59999999999999984e-6 < wj Initial program 62.1%
distribute-rgt1-in62.1%
associate-/l/62.1%
div-sub62.1%
associate-/l*62.1%
*-inverses95.4%
/-rgt-identity95.4%
Simplified95.4%
Final simplification97.8%
(FPCore (wj x) :precision binary64 (if (or (<= wj -3.7e-9) (not (<= wj 4.9e-8))) (- wj (/ (- wj (/ x (exp wj))) (+ wj 1.0))) (- (fma wj wj x) (pow wj 3.0))))
double code(double wj, double x) {
double tmp;
if ((wj <= -3.7e-9) || !(wj <= 4.9e-8)) {
tmp = wj - ((wj - (x / exp(wj))) / (wj + 1.0));
} else {
tmp = fma(wj, wj, x) - pow(wj, 3.0);
}
return tmp;
}
function code(wj, x) tmp = 0.0 if ((wj <= -3.7e-9) || !(wj <= 4.9e-8)) tmp = Float64(wj - Float64(Float64(wj - Float64(x / exp(wj))) / Float64(wj + 1.0))); else tmp = Float64(fma(wj, wj, x) - (wj ^ 3.0)); end return tmp end
code[wj_, x_] := If[Or[LessEqual[wj, -3.7e-9], N[Not[LessEqual[wj, 4.9e-8]], $MachinePrecision]], N[(wj - N[(N[(wj - N[(x / N[Exp[wj], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(wj + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(wj * wj + x), $MachinePrecision] - N[Power[wj, 3.0], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;wj \leq -3.7 \cdot 10^{-9} \lor \neg \left(wj \leq 4.9 \cdot 10^{-8}\right):\\
\;\;\;\;wj - \frac{wj - \frac{x}{e^{wj}}}{wj + 1}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(wj, wj, x\right) - {wj}^{3}\\
\end{array}
\end{array}
if wj < -3.7e-9 or 4.9000000000000002e-8 < wj Initial program 65.1%
distribute-rgt1-in71.6%
associate-/l/71.6%
div-sub65.0%
associate-/l*65.0%
*-inverses90.4%
/-rgt-identity90.4%
Simplified90.4%
if -3.7e-9 < wj < 4.9000000000000002e-8Initial program 79.1%
distribute-rgt1-in79.1%
associate-/l/79.1%
div-sub79.1%
associate-/l*79.1%
*-inverses79.1%
/-rgt-identity79.1%
Simplified79.1%
Taylor expanded in wj around 0 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in x around 0 99.4%
+-commutative99.4%
neg-mul-199.4%
unsub-neg99.4%
Simplified99.4%
Taylor expanded in x around 0 99.4%
+-commutative99.4%
unpow299.4%
fma-def99.4%
Simplified99.4%
Final simplification98.8%
(FPCore (wj x)
:precision binary64
(if (or (<= wj -1e-8) (not (<= wj 1.78e-7)))
(- wj (/ (- wj (/ x (exp wj))) (+ wj 1.0)))
(+
x
(+ (* -2.0 (* wj x)) (* (pow wj 2.0) (- 1.0 (+ (* x -4.0) (* x 1.5))))))))
double code(double wj, double x) {
double tmp;
if ((wj <= -1e-8) || !(wj <= 1.78e-7)) {
tmp = wj - ((wj - (x / exp(wj))) / (wj + 1.0));
} else {
tmp = x + ((-2.0 * (wj * x)) + (pow(wj, 2.0) * (1.0 - ((x * -4.0) + (x * 1.5)))));
}
return tmp;
}
real(8) function code(wj, x)
real(8), intent (in) :: wj
real(8), intent (in) :: x
real(8) :: tmp
if ((wj <= (-1d-8)) .or. (.not. (wj <= 1.78d-7))) then
tmp = wj - ((wj - (x / exp(wj))) / (wj + 1.0d0))
else
tmp = x + (((-2.0d0) * (wj * x)) + ((wj ** 2.0d0) * (1.0d0 - ((x * (-4.0d0)) + (x * 1.5d0)))))
end if
code = tmp
end function
public static double code(double wj, double x) {
double tmp;
if ((wj <= -1e-8) || !(wj <= 1.78e-7)) {
tmp = wj - ((wj - (x / Math.exp(wj))) / (wj + 1.0));
} else {
tmp = x + ((-2.0 * (wj * x)) + (Math.pow(wj, 2.0) * (1.0 - ((x * -4.0) + (x * 1.5)))));
}
return tmp;
}
def code(wj, x): tmp = 0 if (wj <= -1e-8) or not (wj <= 1.78e-7): tmp = wj - ((wj - (x / math.exp(wj))) / (wj + 1.0)) else: tmp = x + ((-2.0 * (wj * x)) + (math.pow(wj, 2.0) * (1.0 - ((x * -4.0) + (x * 1.5))))) return tmp
function code(wj, x) tmp = 0.0 if ((wj <= -1e-8) || !(wj <= 1.78e-7)) tmp = Float64(wj - Float64(Float64(wj - Float64(x / exp(wj))) / Float64(wj + 1.0))); else tmp = Float64(x + Float64(Float64(-2.0 * Float64(wj * x)) + Float64((wj ^ 2.0) * Float64(1.0 - Float64(Float64(x * -4.0) + Float64(x * 1.5)))))); end return tmp end
function tmp_2 = code(wj, x) tmp = 0.0; if ((wj <= -1e-8) || ~((wj <= 1.78e-7))) tmp = wj - ((wj - (x / exp(wj))) / (wj + 1.0)); else tmp = x + ((-2.0 * (wj * x)) + ((wj ^ 2.0) * (1.0 - ((x * -4.0) + (x * 1.5))))); end tmp_2 = tmp; end
code[wj_, x_] := If[Or[LessEqual[wj, -1e-8], N[Not[LessEqual[wj, 1.78e-7]], $MachinePrecision]], N[(wj - N[(N[(wj - N[(x / N[Exp[wj], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(wj + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(-2.0 * N[(wj * x), $MachinePrecision]), $MachinePrecision] + N[(N[Power[wj, 2.0], $MachinePrecision] * N[(1.0 - N[(N[(x * -4.0), $MachinePrecision] + N[(x * 1.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;wj \leq -1 \cdot 10^{-8} \lor \neg \left(wj \leq 1.78 \cdot 10^{-7}\right):\\
\;\;\;\;wj - \frac{wj - \frac{x}{e^{wj}}}{wj + 1}\\
\mathbf{else}:\\
\;\;\;\;x + \left(-2 \cdot \left(wj \cdot x\right) + {wj}^{2} \cdot \left(1 - \left(x \cdot -4 + x \cdot 1.5\right)\right)\right)\\
\end{array}
\end{array}
if wj < -1e-8 or 1.78000000000000006e-7 < wj Initial program 62.8%
distribute-rgt1-in69.8%
associate-/l/69.8%
div-sub62.8%
associate-/l*62.8%
*-inverses89.8%
/-rgt-identity89.8%
Simplified89.8%
if -1e-8 < wj < 1.78000000000000006e-7Initial program 79.2%
distribute-rgt1-in79.2%
associate-/l/79.2%
div-sub79.2%
associate-/l*79.2%
*-inverses79.2%
/-rgt-identity79.2%
Simplified79.2%
Taylor expanded in wj around 0 99.3%
Final simplification98.7%
(FPCore (wj x) :precision binary64 (if (or (<= wj -4.6e-11) (not (<= wj 2.15e-11))) (- wj (/ (- wj (/ x (exp wj))) (+ wj 1.0))) (fma wj wj x)))
double code(double wj, double x) {
double tmp;
if ((wj <= -4.6e-11) || !(wj <= 2.15e-11)) {
tmp = wj - ((wj - (x / exp(wj))) / (wj + 1.0));
} else {
tmp = fma(wj, wj, x);
}
return tmp;
}
function code(wj, x) tmp = 0.0 if ((wj <= -4.6e-11) || !(wj <= 2.15e-11)) tmp = Float64(wj - Float64(Float64(wj - Float64(x / exp(wj))) / Float64(wj + 1.0))); else tmp = fma(wj, wj, x); end return tmp end
code[wj_, x_] := If[Or[LessEqual[wj, -4.6e-11], N[Not[LessEqual[wj, 2.15e-11]], $MachinePrecision]], N[(wj - N[(N[(wj - N[(x / N[Exp[wj], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(wj + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(wj * wj + x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;wj \leq -4.6 \cdot 10^{-11} \lor \neg \left(wj \leq 2.15 \cdot 10^{-11}\right):\\
\;\;\;\;wj - \frac{wj - \frac{x}{e^{wj}}}{wj + 1}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(wj, wj, x\right)\\
\end{array}
\end{array}
if wj < -4.60000000000000027e-11 or 2.15000000000000001e-11 < wj Initial program 68.4%
distribute-rgt1-in73.1%
associate-/l/73.2%
div-sub68.4%
associate-/l*68.4%
*-inverses86.9%
/-rgt-identity86.9%
Simplified86.9%
if -4.60000000000000027e-11 < wj < 2.15000000000000001e-11Initial program 79.1%
distribute-rgt1-in79.1%
associate-/l/79.2%
div-sub79.2%
associate-/l*79.2%
*-inverses79.2%
/-rgt-identity79.2%
Simplified79.2%
Taylor expanded in wj around 0 100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in x around 0 99.8%
+-commutative99.8%
neg-mul-199.8%
unsub-neg99.8%
Simplified99.8%
Taylor expanded in wj around 0 99.5%
+-commutative99.5%
unpow299.5%
fma-def99.5%
Simplified99.5%
Final simplification98.4%
(FPCore (wj x)
:precision binary64
(let* ((t_0 (+ wj (/ (- (- x (* wj x)) wj) (+ wj 1.0)))))
(if (<= wj -1.5e-29)
t_0
(if (<= wj 5.2e-49) x (if (<= wj 2.3e-17) (pow wj 2.0) t_0)))))
double code(double wj, double x) {
double t_0 = wj + (((x - (wj * x)) - wj) / (wj + 1.0));
double tmp;
if (wj <= -1.5e-29) {
tmp = t_0;
} else if (wj <= 5.2e-49) {
tmp = x;
} else if (wj <= 2.3e-17) {
tmp = pow(wj, 2.0);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(wj, x)
real(8), intent (in) :: wj
real(8), intent (in) :: x
real(8) :: t_0
real(8) :: tmp
t_0 = wj + (((x - (wj * x)) - wj) / (wj + 1.0d0))
if (wj <= (-1.5d-29)) then
tmp = t_0
else if (wj <= 5.2d-49) then
tmp = x
else if (wj <= 2.3d-17) then
tmp = wj ** 2.0d0
else
tmp = t_0
end if
code = tmp
end function
public static double code(double wj, double x) {
double t_0 = wj + (((x - (wj * x)) - wj) / (wj + 1.0));
double tmp;
if (wj <= -1.5e-29) {
tmp = t_0;
} else if (wj <= 5.2e-49) {
tmp = x;
} else if (wj <= 2.3e-17) {
tmp = Math.pow(wj, 2.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(wj, x): t_0 = wj + (((x - (wj * x)) - wj) / (wj + 1.0)) tmp = 0 if wj <= -1.5e-29: tmp = t_0 elif wj <= 5.2e-49: tmp = x elif wj <= 2.3e-17: tmp = math.pow(wj, 2.0) else: tmp = t_0 return tmp
function code(wj, x) t_0 = Float64(wj + Float64(Float64(Float64(x - Float64(wj * x)) - wj) / Float64(wj + 1.0))) tmp = 0.0 if (wj <= -1.5e-29) tmp = t_0; elseif (wj <= 5.2e-49) tmp = x; elseif (wj <= 2.3e-17) tmp = wj ^ 2.0; else tmp = t_0; end return tmp end
function tmp_2 = code(wj, x) t_0 = wj + (((x - (wj * x)) - wj) / (wj + 1.0)); tmp = 0.0; if (wj <= -1.5e-29) tmp = t_0; elseif (wj <= 5.2e-49) tmp = x; elseif (wj <= 2.3e-17) tmp = wj ^ 2.0; else tmp = t_0; end tmp_2 = tmp; end
code[wj_, x_] := Block[{t$95$0 = N[(wj + N[(N[(N[(x - N[(wj * x), $MachinePrecision]), $MachinePrecision] - wj), $MachinePrecision] / N[(wj + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[wj, -1.5e-29], t$95$0, If[LessEqual[wj, 5.2e-49], x, If[LessEqual[wj, 2.3e-17], N[Power[wj, 2.0], $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := wj + \frac{\left(x - wj \cdot x\right) - wj}{wj + 1}\\
\mathbf{if}\;wj \leq -1.5 \cdot 10^{-29}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;wj \leq 5.2 \cdot 10^{-49}:\\
\;\;\;\;x\\
\mathbf{elif}\;wj \leq 2.3 \cdot 10^{-17}:\\
\;\;\;\;{wj}^{2}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if wj < -1.5000000000000001e-29 or 2.30000000000000009e-17 < wj Initial program 70.4%
distribute-rgt1-in73.0%
associate-/l/73.4%
div-sub70.6%
associate-/l*70.6%
*-inverses81.1%
/-rgt-identity81.1%
Simplified81.1%
Taylor expanded in wj around 0 70.6%
associate-*r*70.6%
neg-mul-170.6%
Simplified70.6%
if -1.5000000000000001e-29 < wj < 5.1999999999999999e-49Initial program 83.0%
distribute-rgt1-in83.0%
associate-/l/83.0%
div-sub83.0%
associate-/l*83.0%
*-inverses83.0%
/-rgt-identity83.0%
Simplified83.0%
Taylor expanded in wj around 0 93.6%
if 5.1999999999999999e-49 < wj < 2.30000000000000009e-17Initial program 25.9%
Taylor expanded in x around 0 3.3%
distribute-rgt1-in3.3%
*-commutative3.3%
Simplified3.3%
Taylor expanded in wj around 0 77.8%
+-commutative77.8%
mul-1-neg77.8%
unsub-neg77.8%
Simplified77.8%
Taylor expanded in wj around 0 77.8%
Final simplification89.3%
(FPCore (wj x) :precision binary64 (if (<= wj 2.7e-5) (fma wj wj x) (- wj (/ wj (+ wj 1.0)))))
double code(double wj, double x) {
double tmp;
if (wj <= 2.7e-5) {
tmp = fma(wj, wj, x);
} else {
tmp = wj - (wj / (wj + 1.0));
}
return tmp;
}
function code(wj, x) tmp = 0.0 if (wj <= 2.7e-5) tmp = fma(wj, wj, x); else tmp = Float64(wj - Float64(wj / Float64(wj + 1.0))); end return tmp end
code[wj_, x_] := If[LessEqual[wj, 2.7e-5], N[(wj * wj + x), $MachinePrecision], N[(wj - N[(wj / N[(wj + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;wj \leq 2.7 \cdot 10^{-5}:\\
\;\;\;\;\mathsf{fma}\left(wj, wj, x\right)\\
\mathbf{else}:\\
\;\;\;\;wj - \frac{wj}{wj + 1}\\
\end{array}
\end{array}
if wj < 2.6999999999999999e-5Initial program 78.8%
distribute-rgt1-in79.2%
associate-/l/79.3%
div-sub78.8%
associate-/l*78.8%
*-inverses79.3%
/-rgt-identity79.3%
Simplified79.3%
Taylor expanded in wj around 0 97.9%
Taylor expanded in x around 0 97.9%
Taylor expanded in x around 0 97.1%
+-commutative97.1%
neg-mul-197.1%
unsub-neg97.1%
Simplified97.1%
Taylor expanded in wj around 0 96.4%
+-commutative96.4%
unpow296.4%
fma-def96.4%
Simplified96.4%
if 2.6999999999999999e-5 < wj Initial program 62.1%
distribute-rgt1-in62.1%
associate-/l/62.1%
div-sub62.1%
associate-/l*62.1%
*-inverses95.4%
/-rgt-identity95.4%
Simplified95.4%
Taylor expanded in x around 0 84.5%
+-commutative84.5%
Simplified84.5%
Final simplification95.9%
(FPCore (wj x) :precision binary64 (if (<= wj -1.35e-29) (+ wj (/ (- (- x (* wj x)) wj) (+ wj 1.0))) (if (<= wj 2e-6) (+ x (* -2.0 (* wj x))) (- wj (/ wj (+ wj 1.0))))))
double code(double wj, double x) {
double tmp;
if (wj <= -1.35e-29) {
tmp = wj + (((x - (wj * x)) - wj) / (wj + 1.0));
} else if (wj <= 2e-6) {
tmp = x + (-2.0 * (wj * x));
} else {
tmp = wj - (wj / (wj + 1.0));
}
return tmp;
}
real(8) function code(wj, x)
real(8), intent (in) :: wj
real(8), intent (in) :: x
real(8) :: tmp
if (wj <= (-1.35d-29)) then
tmp = wj + (((x - (wj * x)) - wj) / (wj + 1.0d0))
else if (wj <= 2d-6) then
tmp = x + ((-2.0d0) * (wj * x))
else
tmp = wj - (wj / (wj + 1.0d0))
end if
code = tmp
end function
public static double code(double wj, double x) {
double tmp;
if (wj <= -1.35e-29) {
tmp = wj + (((x - (wj * x)) - wj) / (wj + 1.0));
} else if (wj <= 2e-6) {
tmp = x + (-2.0 * (wj * x));
} else {
tmp = wj - (wj / (wj + 1.0));
}
return tmp;
}
def code(wj, x): tmp = 0 if wj <= -1.35e-29: tmp = wj + (((x - (wj * x)) - wj) / (wj + 1.0)) elif wj <= 2e-6: tmp = x + (-2.0 * (wj * x)) else: tmp = wj - (wj / (wj + 1.0)) return tmp
function code(wj, x) tmp = 0.0 if (wj <= -1.35e-29) tmp = Float64(wj + Float64(Float64(Float64(x - Float64(wj * x)) - wj) / Float64(wj + 1.0))); elseif (wj <= 2e-6) tmp = Float64(x + Float64(-2.0 * Float64(wj * x))); else tmp = Float64(wj - Float64(wj / Float64(wj + 1.0))); end return tmp end
function tmp_2 = code(wj, x) tmp = 0.0; if (wj <= -1.35e-29) tmp = wj + (((x - (wj * x)) - wj) / (wj + 1.0)); elseif (wj <= 2e-6) tmp = x + (-2.0 * (wj * x)); else tmp = wj - (wj / (wj + 1.0)); end tmp_2 = tmp; end
code[wj_, x_] := If[LessEqual[wj, -1.35e-29], N[(wj + N[(N[(N[(x - N[(wj * x), $MachinePrecision]), $MachinePrecision] - wj), $MachinePrecision] / N[(wj + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[wj, 2e-6], N[(x + N[(-2.0 * N[(wj * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(wj - N[(wj / N[(wj + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;wj \leq -1.35 \cdot 10^{-29}:\\
\;\;\;\;wj + \frac{\left(x - wj \cdot x\right) - wj}{wj + 1}\\
\mathbf{elif}\;wj \leq 2 \cdot 10^{-6}:\\
\;\;\;\;x + -2 \cdot \left(wj \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;wj - \frac{wj}{wj + 1}\\
\end{array}
\end{array}
if wj < -1.35000000000000011e-29Initial program 72.6%
distribute-rgt1-in77.2%
associate-/l/77.2%
div-sub72.6%
associate-/l*72.6%
*-inverses77.2%
/-rgt-identity77.2%
Simplified77.2%
Taylor expanded in wj around 0 69.8%
associate-*r*69.8%
neg-mul-169.8%
Simplified69.8%
if -1.35000000000000011e-29 < wj < 1.99999999999999991e-6Initial program 79.4%
distribute-rgt1-in79.4%
associate-/l/79.5%
div-sub79.5%
associate-/l*79.5%
*-inverses79.5%
/-rgt-identity79.5%
Simplified79.5%
Taylor expanded in wj around 0 88.5%
*-commutative88.5%
Simplified88.5%
if 1.99999999999999991e-6 < wj Initial program 62.1%
distribute-rgt1-in62.1%
associate-/l/62.1%
div-sub62.1%
associate-/l*62.1%
*-inverses95.4%
/-rgt-identity95.4%
Simplified95.4%
Taylor expanded in x around 0 84.5%
+-commutative84.5%
Simplified84.5%
Final simplification86.7%
(FPCore (wj x) :precision binary64 (if (<= wj 1.7e-5) (+ x (* -2.0 (* wj x))) (- wj (/ wj (+ wj 1.0)))))
double code(double wj, double x) {
double tmp;
if (wj <= 1.7e-5) {
tmp = x + (-2.0 * (wj * x));
} else {
tmp = wj - (wj / (wj + 1.0));
}
return tmp;
}
real(8) function code(wj, x)
real(8), intent (in) :: wj
real(8), intent (in) :: x
real(8) :: tmp
if (wj <= 1.7d-5) then
tmp = x + ((-2.0d0) * (wj * x))
else
tmp = wj - (wj / (wj + 1.0d0))
end if
code = tmp
end function
public static double code(double wj, double x) {
double tmp;
if (wj <= 1.7e-5) {
tmp = x + (-2.0 * (wj * x));
} else {
tmp = wj - (wj / (wj + 1.0));
}
return tmp;
}
def code(wj, x): tmp = 0 if wj <= 1.7e-5: tmp = x + (-2.0 * (wj * x)) else: tmp = wj - (wj / (wj + 1.0)) return tmp
function code(wj, x) tmp = 0.0 if (wj <= 1.7e-5) tmp = Float64(x + Float64(-2.0 * Float64(wj * x))); else tmp = Float64(wj - Float64(wj / Float64(wj + 1.0))); end return tmp end
function tmp_2 = code(wj, x) tmp = 0.0; if (wj <= 1.7e-5) tmp = x + (-2.0 * (wj * x)); else tmp = wj - (wj / (wj + 1.0)); end tmp_2 = tmp; end
code[wj_, x_] := If[LessEqual[wj, 1.7e-5], N[(x + N[(-2.0 * N[(wj * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(wj - N[(wj / N[(wj + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;wj \leq 1.7 \cdot 10^{-5}:\\
\;\;\;\;x + -2 \cdot \left(wj \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;wj - \frac{wj}{wj + 1}\\
\end{array}
\end{array}
if wj < 1.7e-5Initial program 78.8%
distribute-rgt1-in79.2%
associate-/l/79.3%
div-sub78.8%
associate-/l*78.8%
*-inverses79.3%
/-rgt-identity79.3%
Simplified79.3%
Taylor expanded in wj around 0 85.0%
*-commutative85.0%
Simplified85.0%
if 1.7e-5 < wj Initial program 62.1%
distribute-rgt1-in62.1%
associate-/l/62.1%
div-sub62.1%
associate-/l*62.1%
*-inverses95.4%
/-rgt-identity95.4%
Simplified95.4%
Taylor expanded in x around 0 84.5%
+-commutative84.5%
Simplified84.5%
Final simplification85.0%
(FPCore (wj x) :precision binary64 (+ x (* -2.0 (* wj x))))
double code(double wj, double x) {
return x + (-2.0 * (wj * x));
}
real(8) function code(wj, x)
real(8), intent (in) :: wj
real(8), intent (in) :: x
code = x + ((-2.0d0) * (wj * x))
end function
public static double code(double wj, double x) {
return x + (-2.0 * (wj * x));
}
def code(wj, x): return x + (-2.0 * (wj * x))
function code(wj, x) return Float64(x + Float64(-2.0 * Float64(wj * x))) end
function tmp = code(wj, x) tmp = x + (-2.0 * (wj * x)); end
code[wj_, x_] := N[(x + N[(-2.0 * N[(wj * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + -2 \cdot \left(wj \cdot x\right)
\end{array}
Initial program 78.2%
distribute-rgt1-in78.6%
associate-/l/78.7%
div-sub78.2%
associate-/l*78.2%
*-inverses79.8%
/-rgt-identity79.8%
Simplified79.8%
Taylor expanded in wj around 0 82.4%
*-commutative82.4%
Simplified82.4%
Final simplification82.4%
(FPCore (wj x) :precision binary64 wj)
double code(double wj, double x) {
return wj;
}
real(8) function code(wj, x)
real(8), intent (in) :: wj
real(8), intent (in) :: x
code = wj
end function
public static double code(double wj, double x) {
return wj;
}
def code(wj, x): return wj
function code(wj, x) return wj end
function tmp = code(wj, x) tmp = wj; end
code[wj_, x_] := wj
\begin{array}{l}
\\
wj
\end{array}
Initial program 78.2%
distribute-rgt1-in78.6%
associate-/l/78.7%
div-sub78.2%
associate-/l*78.2%
*-inverses79.8%
/-rgt-identity79.8%
Simplified79.8%
Taylor expanded in wj around inf 4.8%
Final simplification4.8%
(FPCore (wj x) :precision binary64 x)
double code(double wj, double x) {
return x;
}
real(8) function code(wj, x)
real(8), intent (in) :: wj
real(8), intent (in) :: x
code = x
end function
public static double code(double wj, double x) {
return x;
}
def code(wj, x): return x
function code(wj, x) return x end
function tmp = code(wj, x) tmp = x; end
code[wj_, x_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 78.2%
distribute-rgt1-in78.6%
associate-/l/78.7%
div-sub78.2%
associate-/l*78.2%
*-inverses79.8%
/-rgt-identity79.8%
Simplified79.8%
Taylor expanded in wj around 0 81.6%
Final simplification81.6%
(FPCore (wj x) :precision binary64 (- wj (- (/ wj (+ wj 1.0)) (/ x (+ (exp wj) (* wj (exp wj)))))))
double code(double wj, double x) {
return wj - ((wj / (wj + 1.0)) - (x / (exp(wj) + (wj * exp(wj)))));
}
real(8) function code(wj, x)
real(8), intent (in) :: wj
real(8), intent (in) :: x
code = wj - ((wj / (wj + 1.0d0)) - (x / (exp(wj) + (wj * exp(wj)))))
end function
public static double code(double wj, double x) {
return wj - ((wj / (wj + 1.0)) - (x / (Math.exp(wj) + (wj * Math.exp(wj)))));
}
def code(wj, x): return wj - ((wj / (wj + 1.0)) - (x / (math.exp(wj) + (wj * math.exp(wj)))))
function code(wj, x) return Float64(wj - Float64(Float64(wj / Float64(wj + 1.0)) - Float64(x / Float64(exp(wj) + Float64(wj * exp(wj)))))) end
function tmp = code(wj, x) tmp = wj - ((wj / (wj + 1.0)) - (x / (exp(wj) + (wj * exp(wj))))); end
code[wj_, x_] := N[(wj - N[(N[(wj / N[(wj + 1.0), $MachinePrecision]), $MachinePrecision] - N[(x / N[(N[Exp[wj], $MachinePrecision] + N[(wj * N[Exp[wj], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
wj - \left(\frac{wj}{wj + 1} - \frac{x}{e^{wj} + wj \cdot e^{wj}}\right)
\end{array}
herbie shell --seed 2024040
(FPCore (wj x)
:name "Jmat.Real.lambertw, newton loop step"
:precision binary64
:herbie-target
(- wj (- (/ wj (+ wj 1.0)) (/ x (+ (exp wj) (* wj (exp wj))))))
(- wj (/ (- (* wj (exp wj)) x) (+ (exp wj) (* wj (exp wj))))))