
(FPCore (w l) :precision binary64 (* (exp (- w)) (pow l (exp w))))
double code(double w, double l) {
return exp(-w) * pow(l, exp(w));
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
code = exp(-w) * (l ** exp(w))
end function
public static double code(double w, double l) {
return Math.exp(-w) * Math.pow(l, Math.exp(w));
}
def code(w, l): return math.exp(-w) * math.pow(l, math.exp(w))
function code(w, l) return Float64(exp(Float64(-w)) * (l ^ exp(w))) end
function tmp = code(w, l) tmp = exp(-w) * (l ^ exp(w)); end
code[w_, l_] := N[(N[Exp[(-w)], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{-w} \cdot {\ell}^{\left(e^{w}\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (w l) :precision binary64 (* (exp (- w)) (pow l (exp w))))
double code(double w, double l) {
return exp(-w) * pow(l, exp(w));
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
code = exp(-w) * (l ** exp(w))
end function
public static double code(double w, double l) {
return Math.exp(-w) * Math.pow(l, Math.exp(w));
}
def code(w, l): return math.exp(-w) * math.pow(l, math.exp(w))
function code(w, l) return Float64(exp(Float64(-w)) * (l ^ exp(w))) end
function tmp = code(w, l) tmp = exp(-w) * (l ^ exp(w)); end
code[w_, l_] := N[(N[Exp[(-w)], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{-w} \cdot {\ell}^{\left(e^{w}\right)}
\end{array}
(FPCore (w l) :precision binary64 (* (exp (- w)) (pow l (exp w))))
double code(double w, double l) {
return exp(-w) * pow(l, exp(w));
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
code = exp(-w) * (l ** exp(w))
end function
public static double code(double w, double l) {
return Math.exp(-w) * Math.pow(l, Math.exp(w));
}
def code(w, l): return math.exp(-w) * math.pow(l, math.exp(w))
function code(w, l) return Float64(exp(Float64(-w)) * (l ^ exp(w))) end
function tmp = code(w, l) tmp = exp(-w) * (l ^ exp(w)); end
code[w_, l_] := N[(N[Exp[(-w)], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{-w} \cdot {\ell}^{\left(e^{w}\right)}
\end{array}
Initial program 99.7%
(FPCore (w l)
:precision binary64
(let* ((t_0 (pow l (exp w))))
(if (<= (* (exp (- w)) t_0) 1e+156)
(/ t_0 (+ 1.0 (* w (+ 1.0 (* w (+ 0.5 (* w 0.16666666666666666)))))))
(/ l (exp w)))))
double code(double w, double l) {
double t_0 = pow(l, exp(w));
double tmp;
if ((exp(-w) * t_0) <= 1e+156) {
tmp = t_0 / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))));
} else {
tmp = l / exp(w);
}
return tmp;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = l ** exp(w)
if ((exp(-w) * t_0) <= 1d+156) then
tmp = t_0 / (1.0d0 + (w * (1.0d0 + (w * (0.5d0 + (w * 0.16666666666666666d0))))))
else
tmp = l / exp(w)
end if
code = tmp
end function
public static double code(double w, double l) {
double t_0 = Math.pow(l, Math.exp(w));
double tmp;
if ((Math.exp(-w) * t_0) <= 1e+156) {
tmp = t_0 / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))));
} else {
tmp = l / Math.exp(w);
}
return tmp;
}
def code(w, l): t_0 = math.pow(l, math.exp(w)) tmp = 0 if (math.exp(-w) * t_0) <= 1e+156: tmp = t_0 / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666)))))) else: tmp = l / math.exp(w) return tmp
function code(w, l) t_0 = l ^ exp(w) tmp = 0.0 if (Float64(exp(Float64(-w)) * t_0) <= 1e+156) tmp = Float64(t_0 / Float64(1.0 + Float64(w * Float64(1.0 + Float64(w * Float64(0.5 + Float64(w * 0.16666666666666666))))))); else tmp = Float64(l / exp(w)); end return tmp end
function tmp_2 = code(w, l) t_0 = l ^ exp(w); tmp = 0.0; if ((exp(-w) * t_0) <= 1e+156) tmp = t_0 / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666)))))); else tmp = l / exp(w); end tmp_2 = tmp; end
code[w_, l_] := Block[{t$95$0 = N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(N[Exp[(-w)], $MachinePrecision] * t$95$0), $MachinePrecision], 1e+156], N[(t$95$0 / N[(1.0 + N[(w * N[(1.0 + N[(w * N[(0.5 + N[(w * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l / N[Exp[w], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := {\ell}^{\left(e^{w}\right)}\\
\mathbf{if}\;e^{-w} \cdot t\_0 \leq 10^{+156}:\\
\;\;\;\;\frac{t\_0}{1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{e^{w}}\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) < 9.9999999999999998e155Initial program 99.5%
exp-neg99.5%
remove-double-neg99.5%
associate-*l/99.5%
*-lft-identity99.5%
remove-double-neg99.5%
Simplified99.5%
Taylor expanded in w around 0 99.2%
*-commutative99.2%
Simplified99.2%
if 9.9999999999999998e155 < (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) Initial program 100.0%
add-sqr-sqrt12.6%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod49.5%
add-sqr-sqrt62.1%
add-sqr-sqrt62.1%
sqrt-unprod62.1%
add-sqr-sqrt49.5%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod12.6%
add-sqr-sqrt28.2%
pow128.2%
exp-neg28.2%
inv-pow28.2%
pow-prod-up100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in w around inf 100.0%
exp-neg100.0%
associate-*r/100.0%
*-rgt-identity100.0%
Simplified100.0%
(FPCore (w l)
:precision binary64
(let* ((t_0 (+ 1.0 (* w (+ 1.0 (* w (+ 0.5 (* w 0.16666666666666666))))))))
(if (<= (* (exp (- w)) (pow l (exp w))) 1e+156)
(/ (pow l t_0) t_0)
(/ l (exp w)))))
double code(double w, double l) {
double t_0 = 1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666)))));
double tmp;
if ((exp(-w) * pow(l, exp(w))) <= 1e+156) {
tmp = pow(l, t_0) / t_0;
} else {
tmp = l / exp(w);
}
return tmp;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
real(8) :: t_0
real(8) :: tmp
t_0 = 1.0d0 + (w * (1.0d0 + (w * (0.5d0 + (w * 0.16666666666666666d0)))))
if ((exp(-w) * (l ** exp(w))) <= 1d+156) then
tmp = (l ** t_0) / t_0
else
tmp = l / exp(w)
end if
code = tmp
end function
public static double code(double w, double l) {
double t_0 = 1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666)))));
double tmp;
if ((Math.exp(-w) * Math.pow(l, Math.exp(w))) <= 1e+156) {
tmp = Math.pow(l, t_0) / t_0;
} else {
tmp = l / Math.exp(w);
}
return tmp;
}
def code(w, l): t_0 = 1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))) tmp = 0 if (math.exp(-w) * math.pow(l, math.exp(w))) <= 1e+156: tmp = math.pow(l, t_0) / t_0 else: tmp = l / math.exp(w) return tmp
function code(w, l) t_0 = Float64(1.0 + Float64(w * Float64(1.0 + Float64(w * Float64(0.5 + Float64(w * 0.16666666666666666)))))) tmp = 0.0 if (Float64(exp(Float64(-w)) * (l ^ exp(w))) <= 1e+156) tmp = Float64((l ^ t_0) / t_0); else tmp = Float64(l / exp(w)); end return tmp end
function tmp_2 = code(w, l) t_0 = 1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))); tmp = 0.0; if ((exp(-w) * (l ^ exp(w))) <= 1e+156) tmp = (l ^ t_0) / t_0; else tmp = l / exp(w); end tmp_2 = tmp; end
code[w_, l_] := Block[{t$95$0 = N[(1.0 + N[(w * N[(1.0 + N[(w * N[(0.5 + N[(w * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(N[Exp[(-w)], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 1e+156], N[(N[Power[l, t$95$0], $MachinePrecision] / t$95$0), $MachinePrecision], N[(l / N[Exp[w], $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)\\
\mathbf{if}\;e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \leq 10^{+156}:\\
\;\;\;\;\frac{{\ell}^{t\_0}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{e^{w}}\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) < 9.9999999999999998e155Initial program 99.5%
exp-neg99.5%
remove-double-neg99.5%
associate-*l/99.5%
*-lft-identity99.5%
remove-double-neg99.5%
Simplified99.5%
Taylor expanded in w around 0 99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in w around 0 98.9%
*-commutative99.2%
Simplified98.9%
if 9.9999999999999998e155 < (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) Initial program 100.0%
add-sqr-sqrt12.6%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod49.5%
add-sqr-sqrt62.1%
add-sqr-sqrt62.1%
sqrt-unprod62.1%
add-sqr-sqrt49.5%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod12.6%
add-sqr-sqrt28.2%
pow128.2%
exp-neg28.2%
inv-pow28.2%
pow-prod-up100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in w around inf 100.0%
exp-neg100.0%
associate-*r/100.0%
*-rgt-identity100.0%
Simplified100.0%
(FPCore (w l)
:precision binary64
(if (<= (* (exp (- w)) (pow l (exp w))) 1e+156)
(/
(pow l (+ 1.0 (* w (+ 1.0 (* w 0.5)))))
(+ 1.0 (* w (+ 1.0 (* w (+ 0.5 (* w 0.16666666666666666)))))))
(/ l (exp w))))
double code(double w, double l) {
double tmp;
if ((exp(-w) * pow(l, exp(w))) <= 1e+156) {
tmp = pow(l, (1.0 + (w * (1.0 + (w * 0.5))))) / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))));
} else {
tmp = l / exp(w);
}
return tmp;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
real(8) :: tmp
if ((exp(-w) * (l ** exp(w))) <= 1d+156) then
tmp = (l ** (1.0d0 + (w * (1.0d0 + (w * 0.5d0))))) / (1.0d0 + (w * (1.0d0 + (w * (0.5d0 + (w * 0.16666666666666666d0))))))
else
tmp = l / exp(w)
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if ((Math.exp(-w) * Math.pow(l, Math.exp(w))) <= 1e+156) {
tmp = Math.pow(l, (1.0 + (w * (1.0 + (w * 0.5))))) / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))));
} else {
tmp = l / Math.exp(w);
}
return tmp;
}
def code(w, l): tmp = 0 if (math.exp(-w) * math.pow(l, math.exp(w))) <= 1e+156: tmp = math.pow(l, (1.0 + (w * (1.0 + (w * 0.5))))) / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666)))))) else: tmp = l / math.exp(w) return tmp
function code(w, l) tmp = 0.0 if (Float64(exp(Float64(-w)) * (l ^ exp(w))) <= 1e+156) tmp = Float64((l ^ Float64(1.0 + Float64(w * Float64(1.0 + Float64(w * 0.5))))) / Float64(1.0 + Float64(w * Float64(1.0 + Float64(w * Float64(0.5 + Float64(w * 0.16666666666666666))))))); else tmp = Float64(l / exp(w)); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if ((exp(-w) * (l ^ exp(w))) <= 1e+156) tmp = (l ^ (1.0 + (w * (1.0 + (w * 0.5))))) / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666)))))); else tmp = l / exp(w); end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[N[(N[Exp[(-w)], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 1e+156], N[(N[Power[l, N[(1.0 + N[(w * N[(1.0 + N[(w * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(1.0 + N[(w * N[(1.0 + N[(w * N[(0.5 + N[(w * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l / N[Exp[w], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \leq 10^{+156}:\\
\;\;\;\;\frac{{\ell}^{\left(1 + w \cdot \left(1 + w \cdot 0.5\right)\right)}}{1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{e^{w}}\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) < 9.9999999999999998e155Initial program 99.5%
exp-neg99.5%
remove-double-neg99.5%
associate-*l/99.5%
*-lft-identity99.5%
remove-double-neg99.5%
Simplified99.5%
Taylor expanded in w around 0 99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in w around 0 98.5%
*-commutative98.5%
Simplified98.5%
if 9.9999999999999998e155 < (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) Initial program 100.0%
add-sqr-sqrt12.6%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod49.5%
add-sqr-sqrt62.1%
add-sqr-sqrt62.1%
sqrt-unprod62.1%
add-sqr-sqrt49.5%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod12.6%
add-sqr-sqrt28.2%
pow128.2%
exp-neg28.2%
inv-pow28.2%
pow-prod-up100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in w around inf 100.0%
exp-neg100.0%
associate-*r/100.0%
*-rgt-identity100.0%
Simplified100.0%
(FPCore (w l)
:precision binary64
(if (<= (* (exp (- w)) (pow l (exp w))) 1e+156)
(/
(pow l (+ 1.0 (* w (+ 1.0 (* w (+ 0.5 (* w 0.16666666666666666)))))))
(+ w 1.0))
(/ l (exp w))))
double code(double w, double l) {
double tmp;
if ((exp(-w) * pow(l, exp(w))) <= 1e+156) {
tmp = pow(l, (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))))) / (w + 1.0);
} else {
tmp = l / exp(w);
}
return tmp;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
real(8) :: tmp
if ((exp(-w) * (l ** exp(w))) <= 1d+156) then
tmp = (l ** (1.0d0 + (w * (1.0d0 + (w * (0.5d0 + (w * 0.16666666666666666d0))))))) / (w + 1.0d0)
else
tmp = l / exp(w)
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if ((Math.exp(-w) * Math.pow(l, Math.exp(w))) <= 1e+156) {
tmp = Math.pow(l, (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))))) / (w + 1.0);
} else {
tmp = l / Math.exp(w);
}
return tmp;
}
def code(w, l): tmp = 0 if (math.exp(-w) * math.pow(l, math.exp(w))) <= 1e+156: tmp = math.pow(l, (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))))) / (w + 1.0) else: tmp = l / math.exp(w) return tmp
function code(w, l) tmp = 0.0 if (Float64(exp(Float64(-w)) * (l ^ exp(w))) <= 1e+156) tmp = Float64((l ^ Float64(1.0 + Float64(w * Float64(1.0 + Float64(w * Float64(0.5 + Float64(w * 0.16666666666666666))))))) / Float64(w + 1.0)); else tmp = Float64(l / exp(w)); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if ((exp(-w) * (l ^ exp(w))) <= 1e+156) tmp = (l ^ (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))))) / (w + 1.0); else tmp = l / exp(w); end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[N[(N[Exp[(-w)], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 1e+156], N[(N[Power[l, N[(1.0 + N[(w * N[(1.0 + N[(w * N[(0.5 + N[(w * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(w + 1.0), $MachinePrecision]), $MachinePrecision], N[(l / N[Exp[w], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \leq 10^{+156}:\\
\;\;\;\;\frac{{\ell}^{\left(1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)\right)}}{w + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{e^{w}}\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) < 9.9999999999999998e155Initial program 99.5%
exp-neg99.5%
remove-double-neg99.5%
associate-*l/99.5%
*-lft-identity99.5%
remove-double-neg99.5%
Simplified99.5%
Taylor expanded in w around 0 98.3%
+-commutative98.3%
Simplified98.3%
Taylor expanded in w around 0 98.3%
*-commutative99.2%
Simplified98.3%
if 9.9999999999999998e155 < (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) Initial program 100.0%
add-sqr-sqrt12.6%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod49.5%
add-sqr-sqrt62.1%
add-sqr-sqrt62.1%
sqrt-unprod62.1%
add-sqr-sqrt49.5%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod12.6%
add-sqr-sqrt28.2%
pow128.2%
exp-neg28.2%
inv-pow28.2%
pow-prod-up100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in w around inf 100.0%
exp-neg100.0%
associate-*r/100.0%
*-rgt-identity100.0%
Simplified100.0%
(FPCore (w l) :precision binary64 (if (<= (* (exp (- w)) (pow l (exp w))) 1e+156) (/ (pow l (+ 1.0 (* w (+ 1.0 (* w 0.5))))) (+ w 1.0)) (/ l (exp w))))
double code(double w, double l) {
double tmp;
if ((exp(-w) * pow(l, exp(w))) <= 1e+156) {
tmp = pow(l, (1.0 + (w * (1.0 + (w * 0.5))))) / (w + 1.0);
} else {
tmp = l / exp(w);
}
return tmp;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
real(8) :: tmp
if ((exp(-w) * (l ** exp(w))) <= 1d+156) then
tmp = (l ** (1.0d0 + (w * (1.0d0 + (w * 0.5d0))))) / (w + 1.0d0)
else
tmp = l / exp(w)
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if ((Math.exp(-w) * Math.pow(l, Math.exp(w))) <= 1e+156) {
tmp = Math.pow(l, (1.0 + (w * (1.0 + (w * 0.5))))) / (w + 1.0);
} else {
tmp = l / Math.exp(w);
}
return tmp;
}
def code(w, l): tmp = 0 if (math.exp(-w) * math.pow(l, math.exp(w))) <= 1e+156: tmp = math.pow(l, (1.0 + (w * (1.0 + (w * 0.5))))) / (w + 1.0) else: tmp = l / math.exp(w) return tmp
function code(w, l) tmp = 0.0 if (Float64(exp(Float64(-w)) * (l ^ exp(w))) <= 1e+156) tmp = Float64((l ^ Float64(1.0 + Float64(w * Float64(1.0 + Float64(w * 0.5))))) / Float64(w + 1.0)); else tmp = Float64(l / exp(w)); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if ((exp(-w) * (l ^ exp(w))) <= 1e+156) tmp = (l ^ (1.0 + (w * (1.0 + (w * 0.5))))) / (w + 1.0); else tmp = l / exp(w); end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[N[(N[Exp[(-w)], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 1e+156], N[(N[Power[l, N[(1.0 + N[(w * N[(1.0 + N[(w * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(w + 1.0), $MachinePrecision]), $MachinePrecision], N[(l / N[Exp[w], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \leq 10^{+156}:\\
\;\;\;\;\frac{{\ell}^{\left(1 + w \cdot \left(1 + w \cdot 0.5\right)\right)}}{w + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{e^{w}}\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) < 9.9999999999999998e155Initial program 99.5%
exp-neg99.5%
remove-double-neg99.5%
associate-*l/99.5%
*-lft-identity99.5%
remove-double-neg99.5%
Simplified99.5%
Taylor expanded in w around 0 98.3%
+-commutative98.3%
Simplified98.3%
Taylor expanded in w around 0 98.3%
*-commutative98.5%
Simplified98.3%
if 9.9999999999999998e155 < (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) Initial program 100.0%
add-sqr-sqrt12.6%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod49.5%
add-sqr-sqrt62.1%
add-sqr-sqrt62.1%
sqrt-unprod62.1%
add-sqr-sqrt49.5%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod12.6%
add-sqr-sqrt28.2%
pow128.2%
exp-neg28.2%
inv-pow28.2%
pow-prod-up100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in w around inf 100.0%
exp-neg100.0%
associate-*r/100.0%
*-rgt-identity100.0%
Simplified100.0%
(FPCore (w l) :precision binary64 (if (<= (* (exp (- w)) (pow l (exp w))) 1e+156) (/ l (+ 1.0 (* w (+ 1.0 (* w 0.5))))) (+ l (* l (* w (+ (* w (+ 0.5 (* w -0.16666666666666666))) -1.0))))))
double code(double w, double l) {
double tmp;
if ((exp(-w) * pow(l, exp(w))) <= 1e+156) {
tmp = l / (1.0 + (w * (1.0 + (w * 0.5))));
} else {
tmp = l + (l * (w * ((w * (0.5 + (w * -0.16666666666666666))) + -1.0)));
}
return tmp;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
real(8) :: tmp
if ((exp(-w) * (l ** exp(w))) <= 1d+156) then
tmp = l / (1.0d0 + (w * (1.0d0 + (w * 0.5d0))))
else
tmp = l + (l * (w * ((w * (0.5d0 + (w * (-0.16666666666666666d0)))) + (-1.0d0))))
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if ((Math.exp(-w) * Math.pow(l, Math.exp(w))) <= 1e+156) {
tmp = l / (1.0 + (w * (1.0 + (w * 0.5))));
} else {
tmp = l + (l * (w * ((w * (0.5 + (w * -0.16666666666666666))) + -1.0)));
}
return tmp;
}
def code(w, l): tmp = 0 if (math.exp(-w) * math.pow(l, math.exp(w))) <= 1e+156: tmp = l / (1.0 + (w * (1.0 + (w * 0.5)))) else: tmp = l + (l * (w * ((w * (0.5 + (w * -0.16666666666666666))) + -1.0))) return tmp
function code(w, l) tmp = 0.0 if (Float64(exp(Float64(-w)) * (l ^ exp(w))) <= 1e+156) tmp = Float64(l / Float64(1.0 + Float64(w * Float64(1.0 + Float64(w * 0.5))))); else tmp = Float64(l + Float64(l * Float64(w * Float64(Float64(w * Float64(0.5 + Float64(w * -0.16666666666666666))) + -1.0)))); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if ((exp(-w) * (l ^ exp(w))) <= 1e+156) tmp = l / (1.0 + (w * (1.0 + (w * 0.5)))); else tmp = l + (l * (w * ((w * (0.5 + (w * -0.16666666666666666))) + -1.0))); end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[N[(N[Exp[(-w)], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 1e+156], N[(l / N[(1.0 + N[(w * N[(1.0 + N[(w * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l + N[(l * N[(w * N[(N[(w * N[(0.5 + N[(w * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \leq 10^{+156}:\\
\;\;\;\;\frac{\ell}{1 + w \cdot \left(1 + w \cdot 0.5\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell + \ell \cdot \left(w \cdot \left(w \cdot \left(0.5 + w \cdot -0.16666666666666666\right) + -1\right)\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) < 9.9999999999999998e155Initial program 99.5%
add-sqr-sqrt62.5%
sqrt-unprod97.4%
sqr-neg97.4%
sqrt-unprod34.9%
add-sqr-sqrt95.0%
add-sqr-sqrt95.0%
sqrt-unprod95.0%
add-sqr-sqrt34.9%
sqrt-unprod72.2%
sqr-neg72.2%
sqrt-unprod37.3%
add-sqr-sqrt72.2%
pow172.2%
exp-neg72.2%
inv-pow72.2%
pow-prod-up95.1%
metadata-eval95.1%
metadata-eval95.1%
metadata-eval95.1%
Applied egg-rr95.1%
Taylor expanded in w around inf 95.1%
exp-neg95.1%
associate-*r/95.1%
*-rgt-identity95.1%
Simplified95.1%
Taylor expanded in w around 0 90.3%
*-commutative98.5%
Simplified90.3%
if 9.9999999999999998e155 < (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) Initial program 100.0%
add-sqr-sqrt12.6%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod49.5%
add-sqr-sqrt62.1%
add-sqr-sqrt62.1%
sqrt-unprod62.1%
add-sqr-sqrt49.5%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod12.6%
add-sqr-sqrt28.2%
pow128.2%
exp-neg28.2%
inv-pow28.2%
pow-prod-up100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in w around 0 75.1%
Taylor expanded in l around 0 82.4%
Final simplification87.1%
(FPCore (w l) :precision binary64 (if (<= (* (exp (- w)) (pow l (exp w))) 1e+156) (/ l (+ 1.0 (* w (+ 1.0 (* w 0.5))))) (* l (+ 1.0 (* w (+ (* w 0.5) -1.0))))))
double code(double w, double l) {
double tmp;
if ((exp(-w) * pow(l, exp(w))) <= 1e+156) {
tmp = l / (1.0 + (w * (1.0 + (w * 0.5))));
} else {
tmp = l * (1.0 + (w * ((w * 0.5) + -1.0)));
}
return tmp;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
real(8) :: tmp
if ((exp(-w) * (l ** exp(w))) <= 1d+156) then
tmp = l / (1.0d0 + (w * (1.0d0 + (w * 0.5d0))))
else
tmp = l * (1.0d0 + (w * ((w * 0.5d0) + (-1.0d0))))
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if ((Math.exp(-w) * Math.pow(l, Math.exp(w))) <= 1e+156) {
tmp = l / (1.0 + (w * (1.0 + (w * 0.5))));
} else {
tmp = l * (1.0 + (w * ((w * 0.5) + -1.0)));
}
return tmp;
}
def code(w, l): tmp = 0 if (math.exp(-w) * math.pow(l, math.exp(w))) <= 1e+156: tmp = l / (1.0 + (w * (1.0 + (w * 0.5)))) else: tmp = l * (1.0 + (w * ((w * 0.5) + -1.0))) return tmp
function code(w, l) tmp = 0.0 if (Float64(exp(Float64(-w)) * (l ^ exp(w))) <= 1e+156) tmp = Float64(l / Float64(1.0 + Float64(w * Float64(1.0 + Float64(w * 0.5))))); else tmp = Float64(l * Float64(1.0 + Float64(w * Float64(Float64(w * 0.5) + -1.0)))); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if ((exp(-w) * (l ^ exp(w))) <= 1e+156) tmp = l / (1.0 + (w * (1.0 + (w * 0.5)))); else tmp = l * (1.0 + (w * ((w * 0.5) + -1.0))); end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[N[(N[Exp[(-w)], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 1e+156], N[(l / N[(1.0 + N[(w * N[(1.0 + N[(w * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * N[(1.0 + N[(w * N[(N[(w * 0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \leq 10^{+156}:\\
\;\;\;\;\frac{\ell}{1 + w \cdot \left(1 + w \cdot 0.5\right)}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \left(1 + w \cdot \left(w \cdot 0.5 + -1\right)\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) < 9.9999999999999998e155Initial program 99.5%
add-sqr-sqrt62.5%
sqrt-unprod97.4%
sqr-neg97.4%
sqrt-unprod34.9%
add-sqr-sqrt95.0%
add-sqr-sqrt95.0%
sqrt-unprod95.0%
add-sqr-sqrt34.9%
sqrt-unprod72.2%
sqr-neg72.2%
sqrt-unprod37.3%
add-sqr-sqrt72.2%
pow172.2%
exp-neg72.2%
inv-pow72.2%
pow-prod-up95.1%
metadata-eval95.1%
metadata-eval95.1%
metadata-eval95.1%
Applied egg-rr95.1%
Taylor expanded in w around inf 95.1%
exp-neg95.1%
associate-*r/95.1%
*-rgt-identity95.1%
Simplified95.1%
Taylor expanded in w around 0 90.3%
*-commutative98.5%
Simplified90.3%
if 9.9999999999999998e155 < (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) Initial program 100.0%
add-sqr-sqrt12.6%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod49.5%
add-sqr-sqrt62.1%
add-sqr-sqrt62.1%
sqrt-unprod62.1%
add-sqr-sqrt49.5%
sqrt-unprod62.1%
sqr-neg62.1%
sqrt-unprod12.6%
add-sqr-sqrt28.2%
pow128.2%
exp-neg28.2%
inv-pow28.2%
pow-prod-up100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in w around 0 72.2%
Taylor expanded in l around 0 72.2%
Final simplification83.0%
(FPCore (w l) :precision binary64 (if (<= (* (exp (- w)) (pow l (exp w))) 5e-180) (/ l (+ w 1.0)) (* l (+ 1.0 (* w (+ (* w 0.5) -1.0))))))
double code(double w, double l) {
double tmp;
if ((exp(-w) * pow(l, exp(w))) <= 5e-180) {
tmp = l / (w + 1.0);
} else {
tmp = l * (1.0 + (w * ((w * 0.5) + -1.0)));
}
return tmp;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
real(8) :: tmp
if ((exp(-w) * (l ** exp(w))) <= 5d-180) then
tmp = l / (w + 1.0d0)
else
tmp = l * (1.0d0 + (w * ((w * 0.5d0) + (-1.0d0))))
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if ((Math.exp(-w) * Math.pow(l, Math.exp(w))) <= 5e-180) {
tmp = l / (w + 1.0);
} else {
tmp = l * (1.0 + (w * ((w * 0.5) + -1.0)));
}
return tmp;
}
def code(w, l): tmp = 0 if (math.exp(-w) * math.pow(l, math.exp(w))) <= 5e-180: tmp = l / (w + 1.0) else: tmp = l * (1.0 + (w * ((w * 0.5) + -1.0))) return tmp
function code(w, l) tmp = 0.0 if (Float64(exp(Float64(-w)) * (l ^ exp(w))) <= 5e-180) tmp = Float64(l / Float64(w + 1.0)); else tmp = Float64(l * Float64(1.0 + Float64(w * Float64(Float64(w * 0.5) + -1.0)))); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if ((exp(-w) * (l ^ exp(w))) <= 5e-180) tmp = l / (w + 1.0); else tmp = l * (1.0 + (w * ((w * 0.5) + -1.0))); end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[N[(N[Exp[(-w)], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision], 5e-180], N[(l / N[(w + 1.0), $MachinePrecision]), $MachinePrecision], N[(l * N[(1.0 + N[(w * N[(N[(w * 0.5), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;e^{-w} \cdot {\ell}^{\left(e^{w}\right)} \leq 5 \cdot 10^{-180}:\\
\;\;\;\;\frac{\ell}{w + 1}\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot \left(1 + w \cdot \left(w \cdot 0.5 + -1\right)\right)\\
\end{array}
\end{array}
if (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) < 5.0000000000000001e-180Initial program 99.5%
add-sqr-sqrt79.1%
sqrt-unprod97.3%
sqr-neg97.3%
sqrt-unprod18.3%
add-sqr-sqrt94.1%
add-sqr-sqrt94.1%
sqrt-unprod94.1%
add-sqr-sqrt18.3%
sqrt-unprod48.8%
sqr-neg48.8%
sqrt-unprod30.5%
add-sqr-sqrt48.8%
pow148.8%
exp-neg48.8%
inv-pow48.8%
pow-prod-up94.3%
metadata-eval94.3%
metadata-eval94.3%
metadata-eval94.3%
Applied egg-rr94.3%
Taylor expanded in w around inf 94.3%
exp-neg94.3%
associate-*r/94.3%
*-rgt-identity94.3%
Simplified94.3%
Taylor expanded in w around 0 69.6%
+-commutative98.8%
Simplified69.6%
if 5.0000000000000001e-180 < (*.f64 (exp.f64 (neg.f64 w)) (pow.f64 l (exp.f64 w))) Initial program 99.8%
add-sqr-sqrt26.7%
sqrt-unprod77.2%
sqr-neg77.2%
sqrt-unprod50.5%
add-sqr-sqrt76.5%
add-sqr-sqrt76.5%
sqrt-unprod76.5%
add-sqr-sqrt50.5%
sqrt-unprod76.5%
sqr-neg76.5%
sqrt-unprod26.0%
add-sqr-sqrt57.0%
pow157.0%
exp-neg57.0%
inv-pow57.0%
pow-prod-up98.3%
metadata-eval98.3%
metadata-eval98.3%
metadata-eval98.3%
Applied egg-rr98.3%
Taylor expanded in w around 0 82.3%
Taylor expanded in l around 0 82.3%
Final simplification78.5%
(FPCore (w l) :precision binary64 (/ (pow l (exp w)) (exp w)))
double code(double w, double l) {
return pow(l, exp(w)) / exp(w);
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
code = (l ** exp(w)) / exp(w)
end function
public static double code(double w, double l) {
return Math.pow(l, Math.exp(w)) / Math.exp(w);
}
def code(w, l): return math.pow(l, math.exp(w)) / math.exp(w)
function code(w, l) return Float64((l ^ exp(w)) / exp(w)) end
function tmp = code(w, l) tmp = (l ^ exp(w)) / exp(w); end
code[w_, l_] := N[(N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision] / N[Exp[w], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{{\ell}^{\left(e^{w}\right)}}{e^{w}}
\end{array}
Initial program 99.7%
exp-neg99.7%
remove-double-neg99.7%
associate-*l/99.7%
*-lft-identity99.7%
remove-double-neg99.7%
Simplified99.7%
(FPCore (w l) :precision binary64 (* (exp (- w)) l))
double code(double w, double l) {
return exp(-w) * l;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
code = exp(-w) * l
end function
public static double code(double w, double l) {
return Math.exp(-w) * l;
}
def code(w, l): return math.exp(-w) * l
function code(w, l) return Float64(exp(Float64(-w)) * l) end
function tmp = code(w, l) tmp = exp(-w) * l; end
code[w_, l_] := N[(N[Exp[(-w)], $MachinePrecision] * l), $MachinePrecision]
\begin{array}{l}
\\
e^{-w} \cdot \ell
\end{array}
Initial program 99.7%
add-sqr-sqrt42.4%
sqrt-unprod83.2%
sqr-neg83.2%
sqrt-unprod40.8%
add-sqr-sqrt81.8%
add-sqr-sqrt81.8%
sqrt-unprod81.8%
add-sqr-sqrt40.8%
sqrt-unprod68.1%
sqr-neg68.1%
sqrt-unprod27.4%
add-sqr-sqrt54.5%
pow154.5%
exp-neg54.5%
inv-pow54.5%
pow-prod-up97.1%
metadata-eval97.1%
metadata-eval97.1%
metadata-eval97.1%
Applied egg-rr97.1%
Final simplification97.1%
(FPCore (w l) :precision binary64 (/ l (exp w)))
double code(double w, double l) {
return l / exp(w);
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
code = l / exp(w)
end function
public static double code(double w, double l) {
return l / Math.exp(w);
}
def code(w, l): return l / math.exp(w)
function code(w, l) return Float64(l / exp(w)) end
function tmp = code(w, l) tmp = l / exp(w); end
code[w_, l_] := N[(l / N[Exp[w], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\ell}{e^{w}}
\end{array}
Initial program 99.7%
add-sqr-sqrt42.4%
sqrt-unprod83.2%
sqr-neg83.2%
sqrt-unprod40.8%
add-sqr-sqrt81.8%
add-sqr-sqrt81.8%
sqrt-unprod81.8%
add-sqr-sqrt40.8%
sqrt-unprod68.1%
sqr-neg68.1%
sqrt-unprod27.4%
add-sqr-sqrt54.5%
pow154.5%
exp-neg54.5%
inv-pow54.5%
pow-prod-up97.1%
metadata-eval97.1%
metadata-eval97.1%
metadata-eval97.1%
Applied egg-rr97.1%
Taylor expanded in w around inf 97.1%
exp-neg97.1%
associate-*r/97.1%
*-rgt-identity97.1%
Simplified97.1%
(FPCore (w l) :precision binary64 (if (<= w 0.14) (* l (+ 1.0 (* w (+ (* w (+ 0.5 (* w -0.16666666666666666))) -1.0)))) 0.0))
double code(double w, double l) {
double tmp;
if (w <= 0.14) {
tmp = l * (1.0 + (w * ((w * (0.5 + (w * -0.16666666666666666))) + -1.0)));
} else {
tmp = 0.0;
}
return tmp;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
real(8) :: tmp
if (w <= 0.14d0) then
tmp = l * (1.0d0 + (w * ((w * (0.5d0 + (w * (-0.16666666666666666d0)))) + (-1.0d0))))
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= 0.14) {
tmp = l * (1.0 + (w * ((w * (0.5 + (w * -0.16666666666666666))) + -1.0)));
} else {
tmp = 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 0.14: tmp = l * (1.0 + (w * ((w * (0.5 + (w * -0.16666666666666666))) + -1.0))) else: tmp = 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 0.14) tmp = Float64(l * Float64(1.0 + Float64(w * Float64(Float64(w * Float64(0.5 + Float64(w * -0.16666666666666666))) + -1.0)))); else tmp = 0.0; end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 0.14) tmp = l * (1.0 + (w * ((w * (0.5 + (w * -0.16666666666666666))) + -1.0))); else tmp = 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 0.14], N[(l * N[(1.0 + N[(w * N[(N[(w * N[(0.5 + N[(w * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 0.14:\\
\;\;\;\;\ell \cdot \left(1 + w \cdot \left(w \cdot \left(0.5 + w \cdot -0.16666666666666666\right) + -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if w < 0.14000000000000001Initial program 99.6%
add-sqr-sqrt32.7%
sqrt-unprod80.4%
sqr-neg80.4%
sqrt-unprod47.7%
add-sqr-sqrt79.6%
add-sqr-sqrt79.6%
sqrt-unprod79.6%
add-sqr-sqrt47.7%
sqrt-unprod79.6%
sqr-neg79.6%
sqrt-unprod31.9%
add-sqr-sqrt63.7%
pow163.7%
exp-neg63.7%
inv-pow63.7%
pow-prod-up97.5%
metadata-eval97.5%
metadata-eval97.5%
metadata-eval97.5%
Applied egg-rr97.5%
Taylor expanded in w around 0 89.2%
if 0.14000000000000001 < w Initial program 100.0%
add-sqr-sqrt100.0%
sqrt-unprod100.0%
add-sqr-sqrt0.0%
sqrt-unprod5.4%
sqr-neg5.4%
sqrt-unprod5.4%
add-sqr-sqrt5.4%
pow15.4%
exp-neg5.4%
inv-pow5.4%
pow-prod-up100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
*-un-lft-identity100.0%
add-sqr-sqrt100.0%
sqrt-unprod100.0%
sqr-neg100.0%
sqrt-unprod0.0%
add-sqr-sqrt3.1%
Applied egg-rr92.2%
Taylor expanded in l around 0 100.0%
Final simplification90.7%
(FPCore (w l) :precision binary64 (if (<= w 0.92) (* l (+ 1.0 (* w (+ (* w (+ 0.5 (* w -0.16666666666666666))) -1.0)))) (/ l (+ 1.0 (* w (+ 1.0 (* w (+ 0.5 (* w 0.16666666666666666)))))))))
double code(double w, double l) {
double tmp;
if (w <= 0.92) {
tmp = l * (1.0 + (w * ((w * (0.5 + (w * -0.16666666666666666))) + -1.0)));
} else {
tmp = l / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))));
}
return tmp;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
real(8) :: tmp
if (w <= 0.92d0) then
tmp = l * (1.0d0 + (w * ((w * (0.5d0 + (w * (-0.16666666666666666d0)))) + (-1.0d0))))
else
tmp = l / (1.0d0 + (w * (1.0d0 + (w * (0.5d0 + (w * 0.16666666666666666d0))))))
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= 0.92) {
tmp = l * (1.0 + (w * ((w * (0.5 + (w * -0.16666666666666666))) + -1.0)));
} else {
tmp = l / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))));
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 0.92: tmp = l * (1.0 + (w * ((w * (0.5 + (w * -0.16666666666666666))) + -1.0))) else: tmp = l / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666)))))) return tmp
function code(w, l) tmp = 0.0 if (w <= 0.92) tmp = Float64(l * Float64(1.0 + Float64(w * Float64(Float64(w * Float64(0.5 + Float64(w * -0.16666666666666666))) + -1.0)))); else tmp = Float64(l / Float64(1.0 + Float64(w * Float64(1.0 + Float64(w * Float64(0.5 + Float64(w * 0.16666666666666666))))))); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 0.92) tmp = l * (1.0 + (w * ((w * (0.5 + (w * -0.16666666666666666))) + -1.0))); else tmp = l / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666)))))); end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 0.92], N[(l * N[(1.0 + N[(w * N[(N[(w * N[(0.5 + N[(w * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l / N[(1.0 + N[(w * N[(1.0 + N[(w * N[(0.5 + N[(w * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 0.92:\\
\;\;\;\;\ell \cdot \left(1 + w \cdot \left(w \cdot \left(0.5 + w \cdot -0.16666666666666666\right) + -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)}\\
\end{array}
\end{array}
if w < 0.92000000000000004Initial program 99.6%
add-sqr-sqrt32.7%
sqrt-unprod80.4%
sqr-neg80.4%
sqrt-unprod47.7%
add-sqr-sqrt79.6%
add-sqr-sqrt79.6%
sqrt-unprod79.6%
add-sqr-sqrt47.7%
sqrt-unprod79.6%
sqr-neg79.6%
sqrt-unprod31.9%
add-sqr-sqrt63.7%
pow163.7%
exp-neg63.7%
inv-pow63.7%
pow-prod-up97.5%
metadata-eval97.5%
metadata-eval97.5%
metadata-eval97.5%
Applied egg-rr97.5%
Taylor expanded in w around 0 89.2%
if 0.92000000000000004 < w Initial program 100.0%
add-sqr-sqrt100.0%
sqrt-unprod100.0%
sqr-neg100.0%
sqrt-unprod0.0%
add-sqr-sqrt94.8%
add-sqr-sqrt94.8%
sqrt-unprod94.8%
add-sqr-sqrt0.0%
sqrt-unprod0.3%
sqr-neg0.3%
sqrt-unprod0.3%
add-sqr-sqrt0.3%
pow10.3%
exp-neg0.3%
inv-pow0.3%
pow-prod-up94.9%
metadata-eval94.9%
metadata-eval94.9%
metadata-eval94.9%
Applied egg-rr94.9%
Taylor expanded in w around inf 94.9%
exp-neg94.9%
associate-*r/94.9%
*-rgt-identity94.9%
Simplified94.9%
Taylor expanded in w around 0 82.1%
*-commutative100.0%
Simplified82.1%
Final simplification88.1%
(FPCore (w l) :precision binary64 (if (<= w 1.6) (+ l (* l (* w (+ (* w (+ 0.5 (* w -0.16666666666666666))) -1.0)))) (/ l (+ 1.0 (* w (+ 1.0 (* w (+ 0.5 (* w 0.16666666666666666)))))))))
double code(double w, double l) {
double tmp;
if (w <= 1.6) {
tmp = l + (l * (w * ((w * (0.5 + (w * -0.16666666666666666))) + -1.0)));
} else {
tmp = l / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))));
}
return tmp;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
real(8) :: tmp
if (w <= 1.6d0) then
tmp = l + (l * (w * ((w * (0.5d0 + (w * (-0.16666666666666666d0)))) + (-1.0d0))))
else
tmp = l / (1.0d0 + (w * (1.0d0 + (w * (0.5d0 + (w * 0.16666666666666666d0))))))
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= 1.6) {
tmp = l + (l * (w * ((w * (0.5 + (w * -0.16666666666666666))) + -1.0)));
} else {
tmp = l / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))));
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 1.6: tmp = l + (l * (w * ((w * (0.5 + (w * -0.16666666666666666))) + -1.0))) else: tmp = l / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666)))))) return tmp
function code(w, l) tmp = 0.0 if (w <= 1.6) tmp = Float64(l + Float64(l * Float64(w * Float64(Float64(w * Float64(0.5 + Float64(w * -0.16666666666666666))) + -1.0)))); else tmp = Float64(l / Float64(1.0 + Float64(w * Float64(1.0 + Float64(w * Float64(0.5 + Float64(w * 0.16666666666666666))))))); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 1.6) tmp = l + (l * (w * ((w * (0.5 + (w * -0.16666666666666666))) + -1.0))); else tmp = l / (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666)))))); end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 1.6], N[(l + N[(l * N[(w * N[(N[(w * N[(0.5 + N[(w * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l / N[(1.0 + N[(w * N[(1.0 + N[(w * N[(0.5 + N[(w * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 1.6:\\
\;\;\;\;\ell + \ell \cdot \left(w \cdot \left(w \cdot \left(0.5 + w \cdot -0.16666666666666666\right) + -1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)}\\
\end{array}
\end{array}
if w < 1.6000000000000001Initial program 99.6%
add-sqr-sqrt32.7%
sqrt-unprod80.4%
sqr-neg80.4%
sqrt-unprod47.7%
add-sqr-sqrt79.6%
add-sqr-sqrt79.6%
sqrt-unprod79.6%
add-sqr-sqrt47.7%
sqrt-unprod79.6%
sqr-neg79.6%
sqrt-unprod31.9%
add-sqr-sqrt63.7%
pow163.7%
exp-neg63.7%
inv-pow63.7%
pow-prod-up97.5%
metadata-eval97.5%
metadata-eval97.5%
metadata-eval97.5%
Applied egg-rr97.5%
Taylor expanded in w around 0 85.7%
Taylor expanded in l around 0 89.2%
if 1.6000000000000001 < w Initial program 100.0%
add-sqr-sqrt100.0%
sqrt-unprod100.0%
sqr-neg100.0%
sqrt-unprod0.0%
add-sqr-sqrt94.8%
add-sqr-sqrt94.8%
sqrt-unprod94.8%
add-sqr-sqrt0.0%
sqrt-unprod0.3%
sqr-neg0.3%
sqrt-unprod0.3%
add-sqr-sqrt0.3%
pow10.3%
exp-neg0.3%
inv-pow0.3%
pow-prod-up94.9%
metadata-eval94.9%
metadata-eval94.9%
metadata-eval94.9%
Applied egg-rr94.9%
Taylor expanded in w around inf 94.9%
exp-neg94.9%
associate-*r/94.9%
*-rgt-identity94.9%
Simplified94.9%
Taylor expanded in w around 0 82.1%
*-commutative100.0%
Simplified82.1%
Final simplification88.1%
(FPCore (w l) :precision binary64 (if (<= w -0.013) (* w (- l)) (/ l (+ w 1.0))))
double code(double w, double l) {
double tmp;
if (w <= -0.013) {
tmp = w * -l;
} else {
tmp = l / (w + 1.0);
}
return tmp;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
real(8) :: tmp
if (w <= (-0.013d0)) then
tmp = w * -l
else
tmp = l / (w + 1.0d0)
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= -0.013) {
tmp = w * -l;
} else {
tmp = l / (w + 1.0);
}
return tmp;
}
def code(w, l): tmp = 0 if w <= -0.013: tmp = w * -l else: tmp = l / (w + 1.0) return tmp
function code(w, l) tmp = 0.0 if (w <= -0.013) tmp = Float64(w * Float64(-l)); else tmp = Float64(l / Float64(w + 1.0)); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= -0.013) tmp = w * -l; else tmp = l / (w + 1.0); end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, -0.013], N[(w * (-l)), $MachinePrecision], N[(l / N[(w + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq -0.013:\\
\;\;\;\;w \cdot \left(-\ell\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{\ell}{w + 1}\\
\end{array}
\end{array}
if w < -0.0129999999999999994Initial program 99.8%
add-sqr-sqrt0.0%
sqrt-unprod46.8%
sqr-neg46.8%
sqrt-unprod46.8%
add-sqr-sqrt46.8%
add-sqr-sqrt46.8%
sqrt-unprod46.8%
add-sqr-sqrt46.8%
sqrt-unprod46.8%
sqr-neg46.8%
sqrt-unprod0.0%
add-sqr-sqrt0.1%
pow10.1%
exp-neg0.1%
inv-pow0.1%
pow-prod-up98.8%
metadata-eval98.8%
metadata-eval98.8%
metadata-eval98.8%
Applied egg-rr98.8%
Taylor expanded in w around 0 26.2%
mul-1-neg26.2%
unsub-neg26.2%
*-rgt-identity26.2%
distribute-lft-out--26.2%
Simplified26.2%
Taylor expanded in w around inf 26.2%
neg-mul-126.2%
*-commutative26.2%
distribute-rgt-neg-in26.2%
Simplified26.2%
if -0.0129999999999999994 < w Initial program 99.6%
add-sqr-sqrt60.0%
sqrt-unprod98.3%
sqr-neg98.3%
sqrt-unprod38.3%
add-sqr-sqrt96.3%
add-sqr-sqrt96.3%
sqrt-unprod96.3%
add-sqr-sqrt38.3%
sqrt-unprod77.0%
sqr-neg77.0%
sqrt-unprod38.7%
add-sqr-sqrt77.0%
pow177.0%
exp-neg77.0%
inv-pow77.0%
pow-prod-up96.4%
metadata-eval96.4%
metadata-eval96.4%
metadata-eval96.4%
Applied egg-rr96.4%
Taylor expanded in w around inf 96.4%
exp-neg96.4%
associate-*r/96.4%
*-rgt-identity96.4%
Simplified96.4%
Taylor expanded in w around 0 85.9%
+-commutative98.9%
Simplified85.9%
(FPCore (w l) :precision binary64 (if (<= w -0.053) (* w (- l)) l))
double code(double w, double l) {
double tmp;
if (w <= -0.053) {
tmp = w * -l;
} else {
tmp = l;
}
return tmp;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
real(8) :: tmp
if (w <= (-0.053d0)) then
tmp = w * -l
else
tmp = l
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= -0.053) {
tmp = w * -l;
} else {
tmp = l;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= -0.053: tmp = w * -l else: tmp = l return tmp
function code(w, l) tmp = 0.0 if (w <= -0.053) tmp = Float64(w * Float64(-l)); else tmp = l; end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= -0.053) tmp = w * -l; else tmp = l; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, -0.053], N[(w * (-l)), $MachinePrecision], l]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq -0.053:\\
\;\;\;\;w \cdot \left(-\ell\right)\\
\mathbf{else}:\\
\;\;\;\;\ell\\
\end{array}
\end{array}
if w < -0.0529999999999999985Initial program 99.8%
add-sqr-sqrt0.0%
sqrt-unprod46.8%
sqr-neg46.8%
sqrt-unprod46.8%
add-sqr-sqrt46.8%
add-sqr-sqrt46.8%
sqrt-unprod46.8%
add-sqr-sqrt46.8%
sqrt-unprod46.8%
sqr-neg46.8%
sqrt-unprod0.0%
add-sqr-sqrt0.1%
pow10.1%
exp-neg0.1%
inv-pow0.1%
pow-prod-up98.8%
metadata-eval98.8%
metadata-eval98.8%
metadata-eval98.8%
Applied egg-rr98.8%
Taylor expanded in w around 0 26.2%
mul-1-neg26.2%
unsub-neg26.2%
*-rgt-identity26.2%
distribute-lft-out--26.2%
Simplified26.2%
Taylor expanded in w around inf 26.2%
neg-mul-126.2%
*-commutative26.2%
distribute-rgt-neg-in26.2%
Simplified26.2%
if -0.0529999999999999985 < w Initial program 99.6%
Taylor expanded in w around 0 78.0%
(FPCore (w l) :precision binary64 (* l (- 1.0 w)))
double code(double w, double l) {
return l * (1.0 - w);
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
code = l * (1.0d0 - w)
end function
public static double code(double w, double l) {
return l * (1.0 - w);
}
def code(w, l): return l * (1.0 - w)
function code(w, l) return Float64(l * Float64(1.0 - w)) end
function tmp = code(w, l) tmp = l * (1.0 - w); end
code[w_, l_] := N[(l * N[(1.0 - w), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\ell \cdot \left(1 - w\right)
\end{array}
Initial program 99.7%
add-sqr-sqrt42.4%
sqrt-unprod83.2%
sqr-neg83.2%
sqrt-unprod40.8%
add-sqr-sqrt81.8%
add-sqr-sqrt81.8%
sqrt-unprod81.8%
add-sqr-sqrt40.8%
sqrt-unprod68.1%
sqr-neg68.1%
sqrt-unprod27.4%
add-sqr-sqrt54.5%
pow154.5%
exp-neg54.5%
inv-pow54.5%
pow-prod-up97.1%
metadata-eval97.1%
metadata-eval97.1%
metadata-eval97.1%
Applied egg-rr97.1%
Taylor expanded in w around 0 62.6%
mul-1-neg62.6%
unsub-neg62.6%
*-rgt-identity62.6%
distribute-lft-out--62.6%
Simplified62.6%
(FPCore (w l) :precision binary64 l)
double code(double w, double l) {
return l;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
code = l
end function
public static double code(double w, double l) {
return l;
}
def code(w, l): return l
function code(w, l) return l end
function tmp = code(w, l) tmp = l; end
code[w_, l_] := l
\begin{array}{l}
\\
\ell
\end{array}
Initial program 99.7%
Taylor expanded in w around 0 56.3%
herbie shell --seed 2024191
(FPCore (w l)
:name "exp-w (used to crash)"
:precision binary64
(* (exp (- w)) (pow l (exp w))))