
(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 18 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.3%
(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.3%
exp-neg99.3%
remove-double-neg99.3%
associate-*l/99.3%
*-lft-identity99.3%
remove-double-neg99.3%
Simplified99.3%
(FPCore (w l)
:precision binary64
(if (<= w -1.6)
(/ l (exp w))
(/
(pow l (exp w))
(+ 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 / exp(w);
} else {
tmp = pow(l, exp(w)) / (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 / exp(w)
else
tmp = (l ** exp(w)) / (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 / Math.exp(w);
} else {
tmp = Math.pow(l, Math.exp(w)) / (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 / math.exp(w) else: tmp = math.pow(l, math.exp(w)) / (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 / exp(w)); else tmp = Float64((l ^ exp(w)) / 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 / exp(w); else tmp = (l ^ exp(w)) / (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[Exp[w], $MachinePrecision]), $MachinePrecision], N[(N[Power[l, N[Exp[w], $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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq -1.6:\\
\;\;\;\;\frac{\ell}{e^{w}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{\left(e^{w}\right)}}{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 100.0%
exp-neg100.0%
remove-double-neg100.0%
associate-*l/100.0%
*-lft-identity100.0%
remove-double-neg100.0%
Simplified100.0%
add-sqr-sqrt0.0%
sqrt-unprod34.5%
sqr-neg34.5%
sqrt-unprod34.5%
add-sqr-sqrt34.5%
add-sqr-sqrt34.5%
sqrt-unprod34.5%
add-sqr-sqrt34.5%
sqrt-unprod34.5%
sqr-neg34.5%
sqrt-unprod0.0%
add-sqr-sqrt0.2%
pow10.2%
exp-neg0.2%
inv-pow0.2%
pow-prod-up97.2%
metadata-eval97.2%
metadata-eval97.2%
metadata-eval97.2%
Applied egg-rr97.2%
Taylor expanded in l around 0 97.2%
if -1.6000000000000001 < w Initial program 99.0%
exp-neg99.0%
remove-double-neg99.0%
associate-*l/99.0%
*-lft-identity99.0%
remove-double-neg99.0%
Simplified99.0%
Taylor expanded in w around 0 99.1%
*-commutative99.1%
Simplified99.1%
(FPCore (w l) :precision binary64 (if (<= w -250.0) (/ l (exp w)) (/ (pow l (exp w)) (+ 1.0 (* w (+ 1.0 (* w 0.5)))))))
double code(double w, double l) {
double tmp;
if (w <= -250.0) {
tmp = l / exp(w);
} else {
tmp = pow(l, exp(w)) / (1.0 + (w * (1.0 + (w * 0.5))));
}
return tmp;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
real(8) :: tmp
if (w <= (-250.0d0)) then
tmp = l / exp(w)
else
tmp = (l ** exp(w)) / (1.0d0 + (w * (1.0d0 + (w * 0.5d0))))
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= -250.0) {
tmp = l / Math.exp(w);
} else {
tmp = Math.pow(l, Math.exp(w)) / (1.0 + (w * (1.0 + (w * 0.5))));
}
return tmp;
}
def code(w, l): tmp = 0 if w <= -250.0: tmp = l / math.exp(w) else: tmp = math.pow(l, math.exp(w)) / (1.0 + (w * (1.0 + (w * 0.5)))) return tmp
function code(w, l) tmp = 0.0 if (w <= -250.0) tmp = Float64(l / exp(w)); else tmp = Float64((l ^ exp(w)) / Float64(1.0 + Float64(w * Float64(1.0 + Float64(w * 0.5))))); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= -250.0) tmp = l / exp(w); else tmp = (l ^ exp(w)) / (1.0 + (w * (1.0 + (w * 0.5)))); end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, -250.0], N[(l / N[Exp[w], $MachinePrecision]), $MachinePrecision], N[(N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision] / N[(1.0 + N[(w * N[(1.0 + N[(w * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq -250:\\
\;\;\;\;\frac{\ell}{e^{w}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{\left(e^{w}\right)}}{1 + w \cdot \left(1 + w \cdot 0.5\right)}\\
\end{array}
\end{array}
if w < -250Initial program 100.0%
exp-neg100.0%
remove-double-neg100.0%
associate-*l/100.0%
*-lft-identity100.0%
remove-double-neg100.0%
Simplified100.0%
add-sqr-sqrt0.0%
sqrt-unprod34.9%
sqr-neg34.9%
sqrt-unprod34.9%
add-sqr-sqrt34.9%
add-sqr-sqrt34.9%
sqrt-unprod34.9%
add-sqr-sqrt34.9%
sqrt-unprod34.9%
sqr-neg34.9%
sqrt-unprod0.0%
add-sqr-sqrt0.1%
pow10.1%
exp-neg0.1%
inv-pow0.1%
pow-prod-up98.6%
metadata-eval98.6%
metadata-eval98.6%
metadata-eval98.6%
Applied egg-rr98.6%
Taylor expanded in l around 0 98.6%
if -250 < w Initial program 99.0%
exp-neg99.0%
remove-double-neg99.0%
associate-*l/99.0%
*-lft-identity99.0%
remove-double-neg99.0%
Simplified99.0%
Taylor expanded in w around 0 98.6%
*-commutative98.6%
Simplified98.6%
(FPCore (w l) :precision binary64 (let* ((t_0 (+ 1.0 (* w (+ 1.0 (* w (+ 0.5 (* w 0.16666666666666666)))))))) (if (<= w -1.6) (/ l (exp w)) (/ (pow l t_0) t_0))))
double code(double w, double l) {
double t_0 = 1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666)))));
double tmp;
if (w <= -1.6) {
tmp = l / exp(w);
} else {
tmp = pow(l, t_0) / t_0;
}
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 (w <= (-1.6d0)) then
tmp = l / exp(w)
else
tmp = (l ** t_0) / t_0
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 (w <= -1.6) {
tmp = l / Math.exp(w);
} else {
tmp = Math.pow(l, t_0) / t_0;
}
return tmp;
}
def code(w, l): t_0 = 1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))) tmp = 0 if w <= -1.6: tmp = l / math.exp(w) else: tmp = math.pow(l, t_0) / t_0 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 (w <= -1.6) tmp = Float64(l / exp(w)); else tmp = Float64((l ^ t_0) / t_0); 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 (w <= -1.6) tmp = l / exp(w); else tmp = (l ^ t_0) / t_0; 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[w, -1.6], N[(l / N[Exp[w], $MachinePrecision]), $MachinePrecision], N[(N[Power[l, t$95$0], $MachinePrecision] / t$95$0), $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}\;w \leq -1.6:\\
\;\;\;\;\frac{\ell}{e^{w}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{t\_0}}{t\_0}\\
\end{array}
\end{array}
if w < -1.6000000000000001Initial program 100.0%
exp-neg100.0%
remove-double-neg100.0%
associate-*l/100.0%
*-lft-identity100.0%
remove-double-neg100.0%
Simplified100.0%
add-sqr-sqrt0.0%
sqrt-unprod34.5%
sqr-neg34.5%
sqrt-unprod34.5%
add-sqr-sqrt34.5%
add-sqr-sqrt34.5%
sqrt-unprod34.5%
add-sqr-sqrt34.5%
sqrt-unprod34.5%
sqr-neg34.5%
sqrt-unprod0.0%
add-sqr-sqrt0.2%
pow10.2%
exp-neg0.2%
inv-pow0.2%
pow-prod-up97.2%
metadata-eval97.2%
metadata-eval97.2%
metadata-eval97.2%
Applied egg-rr97.2%
Taylor expanded in l around 0 97.2%
if -1.6000000000000001 < w Initial program 99.0%
exp-neg99.0%
remove-double-neg99.0%
associate-*l/99.0%
*-lft-identity99.0%
remove-double-neg99.0%
Simplified99.0%
Taylor expanded in w around 0 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in w around 0 99.0%
*-commutative99.1%
Simplified99.0%
(FPCore (w l)
:precision binary64
(if (<= w -2.4)
(/ l (exp w))
(/
(pow l (+ 1.0 (* w (+ 1.0 (* w (+ 0.5 (* w 0.16666666666666666)))))))
(+ 1.0 (* w (+ 1.0 (* w 0.5)))))))
double code(double w, double l) {
double tmp;
if (w <= -2.4) {
tmp = l / exp(w);
} else {
tmp = pow(l, (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))))) / (1.0 + (w * (1.0 + (w * 0.5))));
}
return tmp;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
real(8) :: tmp
if (w <= (-2.4d0)) then
tmp = l / exp(w)
else
tmp = (l ** (1.0d0 + (w * (1.0d0 + (w * (0.5d0 + (w * 0.16666666666666666d0))))))) / (1.0d0 + (w * (1.0d0 + (w * 0.5d0))))
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= -2.4) {
tmp = l / Math.exp(w);
} else {
tmp = Math.pow(l, (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))))) / (1.0 + (w * (1.0 + (w * 0.5))));
}
return tmp;
}
def code(w, l): tmp = 0 if w <= -2.4: tmp = l / math.exp(w) else: tmp = math.pow(l, (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))))) / (1.0 + (w * (1.0 + (w * 0.5)))) return tmp
function code(w, l) tmp = 0.0 if (w <= -2.4) tmp = Float64(l / exp(w)); else tmp = Float64((l ^ Float64(1.0 + Float64(w * Float64(1.0 + Float64(w * Float64(0.5 + Float64(w * 0.16666666666666666))))))) / Float64(1.0 + Float64(w * Float64(1.0 + Float64(w * 0.5))))); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= -2.4) tmp = l / exp(w); else tmp = (l ^ (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))))) / (1.0 + (w * (1.0 + (w * 0.5)))); end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, -2.4], N[(l / N[Exp[w], $MachinePrecision]), $MachinePrecision], 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[(1.0 + N[(w * N[(1.0 + N[(w * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq -2.4:\\
\;\;\;\;\frac{\ell}{e^{w}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{\left(1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)\right)}}{1 + w \cdot \left(1 + w \cdot 0.5\right)}\\
\end{array}
\end{array}
if w < -2.39999999999999991Initial program 100.0%
exp-neg100.0%
remove-double-neg100.0%
associate-*l/100.0%
*-lft-identity100.0%
remove-double-neg100.0%
Simplified100.0%
add-sqr-sqrt0.0%
sqrt-unprod34.9%
sqr-neg34.9%
sqrt-unprod34.9%
add-sqr-sqrt34.9%
add-sqr-sqrt34.9%
sqrt-unprod34.9%
add-sqr-sqrt34.9%
sqrt-unprod34.9%
sqr-neg34.9%
sqrt-unprod0.0%
add-sqr-sqrt0.1%
pow10.1%
exp-neg0.1%
inv-pow0.1%
pow-prod-up98.6%
metadata-eval98.6%
metadata-eval98.6%
metadata-eval98.6%
Applied egg-rr98.6%
Taylor expanded in l around 0 98.6%
if -2.39999999999999991 < w Initial program 99.0%
exp-neg99.0%
remove-double-neg99.0%
associate-*l/99.0%
*-lft-identity99.0%
remove-double-neg99.0%
Simplified99.0%
Taylor expanded in w around 0 98.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in w around 0 98.5%
*-commutative98.6%
Simplified98.5%
Taylor expanded in w around 0 98.5%
(FPCore (w l) :precision binary64 (let* ((t_0 (+ 1.0 (* w (+ 1.0 (* w 0.5)))))) (if (<= w -2.0) (/ l (exp w)) (/ (pow l t_0) t_0))))
double code(double w, double l) {
double t_0 = 1.0 + (w * (1.0 + (w * 0.5)));
double tmp;
if (w <= -2.0) {
tmp = l / exp(w);
} else {
tmp = pow(l, t_0) / t_0;
}
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)))
if (w <= (-2.0d0)) then
tmp = l / exp(w)
else
tmp = (l ** t_0) / t_0
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)));
double tmp;
if (w <= -2.0) {
tmp = l / Math.exp(w);
} else {
tmp = Math.pow(l, t_0) / t_0;
}
return tmp;
}
def code(w, l): t_0 = 1.0 + (w * (1.0 + (w * 0.5))) tmp = 0 if w <= -2.0: tmp = l / math.exp(w) else: tmp = math.pow(l, t_0) / t_0 return tmp
function code(w, l) t_0 = Float64(1.0 + Float64(w * Float64(1.0 + Float64(w * 0.5)))) tmp = 0.0 if (w <= -2.0) tmp = Float64(l / exp(w)); else tmp = Float64((l ^ t_0) / t_0); end return tmp end
function tmp_2 = code(w, l) t_0 = 1.0 + (w * (1.0 + (w * 0.5))); tmp = 0.0; if (w <= -2.0) tmp = l / exp(w); else tmp = (l ^ t_0) / t_0; end tmp_2 = tmp; end
code[w_, l_] := Block[{t$95$0 = N[(1.0 + N[(w * N[(1.0 + N[(w * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[w, -2.0], N[(l / N[Exp[w], $MachinePrecision]), $MachinePrecision], N[(N[Power[l, t$95$0], $MachinePrecision] / t$95$0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + w \cdot \left(1 + w \cdot 0.5\right)\\
\mathbf{if}\;w \leq -2:\\
\;\;\;\;\frac{\ell}{e^{w}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{t\_0}}{t\_0}\\
\end{array}
\end{array}
if w < -2Initial program 100.0%
exp-neg100.0%
remove-double-neg100.0%
associate-*l/100.0%
*-lft-identity100.0%
remove-double-neg100.0%
Simplified100.0%
add-sqr-sqrt0.0%
sqrt-unprod34.9%
sqr-neg34.9%
sqrt-unprod34.9%
add-sqr-sqrt34.9%
add-sqr-sqrt34.9%
sqrt-unprod34.9%
add-sqr-sqrt34.9%
sqrt-unprod34.9%
sqr-neg34.9%
sqrt-unprod0.0%
add-sqr-sqrt0.1%
pow10.1%
exp-neg0.1%
inv-pow0.1%
pow-prod-up98.6%
metadata-eval98.6%
metadata-eval98.6%
metadata-eval98.6%
Applied egg-rr98.6%
Taylor expanded in l around 0 98.6%
if -2 < w Initial program 99.0%
exp-neg99.0%
remove-double-neg99.0%
associate-*l/99.0%
*-lft-identity99.0%
remove-double-neg99.0%
Simplified99.0%
Taylor expanded in w around 0 98.6%
*-commutative98.6%
Simplified98.6%
Taylor expanded in w around 0 98.4%
*-commutative98.6%
Simplified98.4%
(FPCore (w l)
:precision binary64
(if (<= w -1.0)
(/ l (exp w))
(/
(pow l (+ 1.0 (* w (+ 1.0 (* w (+ 0.5 (* w 0.16666666666666666)))))))
(+ w 1.0))))
double code(double w, double l) {
double tmp;
if (w <= -1.0) {
tmp = l / exp(w);
} else {
tmp = pow(l, (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))))) / (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 <= (-1.0d0)) then
tmp = l / exp(w)
else
tmp = (l ** (1.0d0 + (w * (1.0d0 + (w * (0.5d0 + (w * 0.16666666666666666d0))))))) / (w + 1.0d0)
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= -1.0) {
tmp = l / Math.exp(w);
} else {
tmp = Math.pow(l, (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))))) / (w + 1.0);
}
return tmp;
}
def code(w, l): tmp = 0 if w <= -1.0: tmp = l / math.exp(w) else: tmp = math.pow(l, (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))))) / (w + 1.0) return tmp
function code(w, l) tmp = 0.0 if (w <= -1.0) tmp = Float64(l / exp(w)); else tmp = Float64((l ^ Float64(1.0 + Float64(w * Float64(1.0 + Float64(w * Float64(0.5 + Float64(w * 0.16666666666666666))))))) / Float64(w + 1.0)); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= -1.0) tmp = l / exp(w); else tmp = (l ^ (1.0 + (w * (1.0 + (w * (0.5 + (w * 0.16666666666666666))))))) / (w + 1.0); end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, -1.0], N[(l / N[Exp[w], $MachinePrecision]), $MachinePrecision], 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]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq -1:\\
\;\;\;\;\frac{\ell}{e^{w}}\\
\mathbf{else}:\\
\;\;\;\;\frac{{\ell}^{\left(1 + w \cdot \left(1 + w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)\right)}}{w + 1}\\
\end{array}
\end{array}
if w < -1Initial program 100.0%
exp-neg100.0%
remove-double-neg100.0%
associate-*l/100.0%
*-lft-identity100.0%
remove-double-neg100.0%
Simplified100.0%
add-sqr-sqrt0.0%
sqrt-unprod34.5%
sqr-neg34.5%
sqrt-unprod34.5%
add-sqr-sqrt34.5%
add-sqr-sqrt34.5%
sqrt-unprod34.5%
add-sqr-sqrt34.5%
sqrt-unprod34.5%
sqr-neg34.5%
sqrt-unprod0.0%
add-sqr-sqrt0.2%
pow10.2%
exp-neg0.2%
inv-pow0.2%
pow-prod-up97.2%
metadata-eval97.2%
metadata-eval97.2%
metadata-eval97.2%
Applied egg-rr97.2%
Taylor expanded in l around 0 97.2%
if -1 < w Initial program 99.0%
exp-neg99.0%
remove-double-neg99.0%
associate-*l/99.0%
*-lft-identity99.0%
remove-double-neg99.0%
Simplified99.0%
Taylor expanded in w around 0 99.1%
*-commutative99.1%
Simplified99.1%
Taylor expanded in w around 0 99.0%
*-commutative99.1%
Simplified99.0%
Taylor expanded in w around 0 98.8%
Final simplification98.3%
(FPCore (w l) :precision binary64 (* l (/ 1.0 (exp w))))
double code(double w, double l) {
return l * (1.0 / exp(w));
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
code = l * (1.0d0 / exp(w))
end function
public static double code(double w, double l) {
return l * (1.0 / Math.exp(w));
}
def code(w, l): return l * (1.0 / math.exp(w))
function code(w, l) return Float64(l * Float64(1.0 / exp(w))) end
function tmp = code(w, l) tmp = l * (1.0 / exp(w)); end
code[w_, l_] := N[(l * N[(1.0 / N[Exp[w], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\ell \cdot \frac{1}{e^{w}}
\end{array}
Initial program 99.3%
exp-neg99.3%
remove-double-neg99.3%
associate-*l/99.3%
*-lft-identity99.3%
remove-double-neg99.3%
Simplified99.3%
add-sqr-sqrt39.3%
sqrt-unprod81.1%
sqr-neg81.1%
sqrt-unprod41.8%
add-sqr-sqrt80.3%
add-sqr-sqrt80.3%
sqrt-unprod80.3%
add-sqr-sqrt41.8%
sqrt-unprod68.6%
sqr-neg68.6%
sqrt-unprod26.8%
add-sqr-sqrt59.7%
pow159.7%
exp-neg59.6%
inv-pow59.7%
pow-prod-up96.8%
metadata-eval96.8%
metadata-eval96.8%
metadata-eval96.8%
Applied egg-rr96.8%
frac-2neg96.8%
div-inv96.8%
*-rgt-identity96.8%
Applied egg-rr96.8%
Final simplification96.8%
(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.3%
exp-neg99.3%
remove-double-neg99.3%
associate-*l/99.3%
*-lft-identity99.3%
remove-double-neg99.3%
Simplified99.3%
add-sqr-sqrt39.3%
sqrt-unprod81.1%
sqr-neg81.1%
sqrt-unprod41.8%
add-sqr-sqrt80.3%
add-sqr-sqrt80.3%
sqrt-unprod80.3%
add-sqr-sqrt41.8%
sqrt-unprod68.6%
sqr-neg68.6%
sqrt-unprod26.8%
add-sqr-sqrt59.7%
pow159.7%
exp-neg59.6%
inv-pow59.7%
pow-prod-up96.8%
metadata-eval96.8%
metadata-eval96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Taylor expanded in l around 0 96.8%
(FPCore (w l) :precision binary64 (if (<= w 0.86) (+ l (* l (* w (+ -1.0 (* w (+ 0.5 (* w -0.16666666666666666))))))) (* l 0.0)))
double code(double w, double l) {
double tmp;
if (w <= 0.86) {
tmp = l + (l * (w * (-1.0 + (w * (0.5 + (w * -0.16666666666666666))))));
} else {
tmp = l * 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.86d0) then
tmp = l + (l * (w * ((-1.0d0) + (w * (0.5d0 + (w * (-0.16666666666666666d0)))))))
else
tmp = l * 0.0d0
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= 0.86) {
tmp = l + (l * (w * (-1.0 + (w * (0.5 + (w * -0.16666666666666666))))));
} else {
tmp = l * 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 0.86: tmp = l + (l * (w * (-1.0 + (w * (0.5 + (w * -0.16666666666666666)))))) else: tmp = l * 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 0.86) tmp = Float64(l + Float64(l * Float64(w * Float64(-1.0 + Float64(w * Float64(0.5 + Float64(w * -0.16666666666666666))))))); else tmp = Float64(l * 0.0); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 0.86) tmp = l + (l * (w * (-1.0 + (w * (0.5 + (w * -0.16666666666666666)))))); else tmp = l * 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 0.86], N[(l + N[(l * N[(w * N[(-1.0 + N[(w * N[(0.5 + N[(w * -0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * 0.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 0.86:\\
\;\;\;\;\ell + \ell \cdot \left(w \cdot \left(-1 + w \cdot \left(0.5 + w \cdot -0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot 0\\
\end{array}
\end{array}
if w < 0.859999999999999987Initial program 99.6%
exp-neg99.6%
remove-double-neg99.6%
associate-*l/99.6%
*-lft-identity99.6%
remove-double-neg99.6%
Simplified99.6%
add-sqr-sqrt31.4%
sqrt-unprod78.9%
sqr-neg78.9%
sqrt-unprod47.6%
add-sqr-sqrt78.0%
add-sqr-sqrt78.0%
sqrt-unprod78.0%
add-sqr-sqrt47.6%
sqrt-unprod78.0%
sqr-neg78.0%
sqrt-unprod30.5%
add-sqr-sqrt67.9%
pow167.9%
exp-neg67.9%
inv-pow67.9%
pow-prod-up96.8%
metadata-eval96.8%
metadata-eval96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Taylor expanded in w around 0 86.2%
Taylor expanded in l around 0 89.5%
if 0.859999999999999987 < w Initial program 96.8%
exp-neg96.8%
remove-double-neg96.8%
associate-*l/96.8%
*-lft-identity96.8%
remove-double-neg96.8%
Simplified96.8%
add-sqr-sqrt96.8%
sqrt-unprod96.8%
sqr-neg96.8%
sqrt-unprod0.0%
add-sqr-sqrt96.8%
add-sqr-sqrt96.8%
sqrt-unprod96.8%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
pow10.0%
exp-neg0.0%
inv-pow0.0%
pow-prod-up96.8%
metadata-eval96.8%
metadata-eval96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Taylor expanded in w around 0 3.4%
mul-1-neg3.4%
unsub-neg3.4%
Simplified3.4%
Taylor expanded in w around inf 3.4%
neg-mul-13.4%
distribute-rgt-neg-in3.4%
Simplified3.4%
add-sqr-sqrt0.0%
sqrt-unprod3.1%
sqr-neg3.1%
sqrt-unprod3.5%
add-sqr-sqrt3.5%
add-log-exp4.7%
pow14.7%
pow14.7%
add-sqr-sqrt4.7%
sqrt-unprod4.7%
sqr-neg4.7%
sqrt-unprod0.0%
add-sqr-sqrt1.5%
add-sqr-sqrt1.5%
sqrt-unprod1.5%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
pow10.0%
exp-neg0.0%
inv-pow0.0%
pow-prod-up96.8%
metadata-eval96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Final simplification90.4%
(FPCore (w l) :precision binary64 (if (<= w 1560.0) (* l (- (* w (- -1.0 (* w -0.5))) -1.0)) (* l 0.0)))
double code(double w, double l) {
double tmp;
if (w <= 1560.0) {
tmp = l * ((w * (-1.0 - (w * -0.5))) - -1.0);
} else {
tmp = l * 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 <= 1560.0d0) then
tmp = l * ((w * ((-1.0d0) - (w * (-0.5d0)))) - (-1.0d0))
else
tmp = l * 0.0d0
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= 1560.0) {
tmp = l * ((w * (-1.0 - (w * -0.5))) - -1.0);
} else {
tmp = l * 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 1560.0: tmp = l * ((w * (-1.0 - (w * -0.5))) - -1.0) else: tmp = l * 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 1560.0) tmp = Float64(l * Float64(Float64(w * Float64(-1.0 - Float64(w * -0.5))) - -1.0)); else tmp = Float64(l * 0.0); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 1560.0) tmp = l * ((w * (-1.0 - (w * -0.5))) - -1.0); else tmp = l * 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 1560.0], N[(l * N[(N[(w * N[(-1.0 - N[(w * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision], N[(l * 0.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 1560:\\
\;\;\;\;\ell \cdot \left(w \cdot \left(-1 - w \cdot -0.5\right) - -1\right)\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot 0\\
\end{array}
\end{array}
if w < 1560Initial program 99.2%
exp-neg99.2%
remove-double-neg99.2%
associate-*l/99.2%
*-lft-identity99.2%
remove-double-neg99.2%
Simplified99.2%
add-sqr-sqrt31.2%
sqrt-unprod78.6%
sqr-neg78.6%
sqrt-unprod47.3%
add-sqr-sqrt77.7%
add-sqr-sqrt77.7%
sqrt-unprod77.7%
add-sqr-sqrt47.3%
sqrt-unprod77.7%
sqr-neg77.7%
sqrt-unprod30.4%
add-sqr-sqrt67.6%
pow167.6%
exp-neg67.6%
inv-pow67.6%
pow-prod-up96.3%
metadata-eval96.3%
metadata-eval96.3%
metadata-eval96.3%
Applied egg-rr96.3%
frac-2neg96.3%
div-inv96.3%
*-rgt-identity96.3%
Applied egg-rr96.3%
Taylor expanded in w around 0 86.1%
if 1560 < w Initial program 100.0%
exp-neg100.0%
remove-double-neg100.0%
associate-*l/100.0%
*-lft-identity100.0%
remove-double-neg100.0%
Simplified100.0%
add-sqr-sqrt100.0%
sqrt-unprod100.0%
sqr-neg100.0%
sqrt-unprod0.0%
add-sqr-sqrt100.0%
add-sqr-sqrt100.0%
sqrt-unprod100.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
pow10.0%
exp-neg0.0%
inv-pow0.0%
pow-prod-up100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in w around 0 3.5%
mul-1-neg3.5%
unsub-neg3.5%
Simplified3.5%
Taylor expanded in w around inf 3.5%
neg-mul-13.5%
distribute-rgt-neg-in3.5%
Simplified3.5%
add-sqr-sqrt0.0%
sqrt-unprod3.1%
sqr-neg3.1%
sqrt-unprod3.5%
add-sqr-sqrt3.5%
add-log-exp1.6%
pow11.6%
pow11.6%
add-sqr-sqrt1.6%
sqrt-unprod1.6%
sqr-neg1.6%
sqrt-unprod0.0%
add-sqr-sqrt1.6%
add-sqr-sqrt1.6%
sqrt-unprod1.6%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
pow10.0%
exp-neg0.0%
inv-pow0.0%
pow-prod-up100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Final simplification87.7%
(FPCore (w l) :precision binary64 (if (<= w 1560.0) (+ l (* w (- (* w (* l 0.5)) l))) (* l 0.0)))
double code(double w, double l) {
double tmp;
if (w <= 1560.0) {
tmp = l + (w * ((w * (l * 0.5)) - l));
} else {
tmp = l * 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 <= 1560.0d0) then
tmp = l + (w * ((w * (l * 0.5d0)) - l))
else
tmp = l * 0.0d0
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= 1560.0) {
tmp = l + (w * ((w * (l * 0.5)) - l));
} else {
tmp = l * 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 1560.0: tmp = l + (w * ((w * (l * 0.5)) - l)) else: tmp = l * 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 1560.0) tmp = Float64(l + Float64(w * Float64(Float64(w * Float64(l * 0.5)) - l))); else tmp = Float64(l * 0.0); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 1560.0) tmp = l + (w * ((w * (l * 0.5)) - l)); else tmp = l * 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 1560.0], N[(l + N[(w * N[(N[(w * N[(l * 0.5), $MachinePrecision]), $MachinePrecision] - l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l * 0.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 1560:\\
\;\;\;\;\ell + w \cdot \left(w \cdot \left(\ell \cdot 0.5\right) - \ell\right)\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot 0\\
\end{array}
\end{array}
if w < 1560Initial program 99.2%
exp-neg99.2%
remove-double-neg99.2%
associate-*l/99.2%
*-lft-identity99.2%
remove-double-neg99.2%
Simplified99.2%
add-sqr-sqrt31.2%
sqrt-unprod78.6%
sqr-neg78.6%
sqrt-unprod47.3%
add-sqr-sqrt77.7%
add-sqr-sqrt77.7%
sqrt-unprod77.7%
add-sqr-sqrt47.3%
sqrt-unprod77.7%
sqr-neg77.7%
sqrt-unprod30.4%
add-sqr-sqrt67.6%
pow167.6%
exp-neg67.6%
inv-pow67.6%
pow-prod-up96.3%
metadata-eval96.3%
metadata-eval96.3%
metadata-eval96.3%
Applied egg-rr96.3%
frac-2neg96.3%
div-inv96.3%
*-rgt-identity96.3%
Applied egg-rr96.3%
Taylor expanded in w around 0 79.6%
mul-1-neg79.6%
distribute-rgt-out79.6%
metadata-eval79.6%
distribute-rgt-neg-out79.6%
distribute-rgt-neg-in79.6%
metadata-eval79.6%
Simplified79.6%
if 1560 < w Initial program 100.0%
exp-neg100.0%
remove-double-neg100.0%
associate-*l/100.0%
*-lft-identity100.0%
remove-double-neg100.0%
Simplified100.0%
add-sqr-sqrt100.0%
sqrt-unprod100.0%
sqr-neg100.0%
sqrt-unprod0.0%
add-sqr-sqrt100.0%
add-sqr-sqrt100.0%
sqrt-unprod100.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
pow10.0%
exp-neg0.0%
inv-pow0.0%
pow-prod-up100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in w around 0 3.5%
mul-1-neg3.5%
unsub-neg3.5%
Simplified3.5%
Taylor expanded in w around inf 3.5%
neg-mul-13.5%
distribute-rgt-neg-in3.5%
Simplified3.5%
add-sqr-sqrt0.0%
sqrt-unprod3.1%
sqr-neg3.1%
sqrt-unprod3.5%
add-sqr-sqrt3.5%
add-log-exp1.6%
pow11.6%
pow11.6%
add-sqr-sqrt1.6%
sqrt-unprod1.6%
sqr-neg1.6%
sqrt-unprod0.0%
add-sqr-sqrt1.6%
add-sqr-sqrt1.6%
sqrt-unprod1.6%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
pow10.0%
exp-neg0.0%
inv-pow0.0%
pow-prod-up100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
(FPCore (w l) :precision binary64 (if (<= w -500.0) (* w (- l)) (if (<= w 1560.0) l (* l 0.0))))
double code(double w, double l) {
double tmp;
if (w <= -500.0) {
tmp = w * -l;
} else if (w <= 1560.0) {
tmp = l;
} else {
tmp = l * 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 <= (-500.0d0)) then
tmp = w * -l
else if (w <= 1560.0d0) then
tmp = l
else
tmp = l * 0.0d0
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= -500.0) {
tmp = w * -l;
} else if (w <= 1560.0) {
tmp = l;
} else {
tmp = l * 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= -500.0: tmp = w * -l elif w <= 1560.0: tmp = l else: tmp = l * 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= -500.0) tmp = Float64(w * Float64(-l)); elseif (w <= 1560.0) tmp = l; else tmp = Float64(l * 0.0); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= -500.0) tmp = w * -l; elseif (w <= 1560.0) tmp = l; else tmp = l * 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, -500.0], N[(w * (-l)), $MachinePrecision], If[LessEqual[w, 1560.0], l, N[(l * 0.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq -500:\\
\;\;\;\;w \cdot \left(-\ell\right)\\
\mathbf{elif}\;w \leq 1560:\\
\;\;\;\;\ell\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot 0\\
\end{array}
\end{array}
if w < -500Initial program 100.0%
exp-neg100.0%
remove-double-neg100.0%
associate-*l/100.0%
*-lft-identity100.0%
remove-double-neg100.0%
Simplified100.0%
add-sqr-sqrt0.0%
sqrt-unprod35.4%
sqr-neg35.4%
sqrt-unprod35.4%
add-sqr-sqrt35.4%
add-sqr-sqrt35.4%
sqrt-unprod35.4%
add-sqr-sqrt35.4%
sqrt-unprod35.4%
sqr-neg35.4%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
pow10.0%
exp-neg0.0%
inv-pow0.0%
pow-prod-up100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in w around 0 26.1%
mul-1-neg26.1%
unsub-neg26.1%
Simplified26.1%
Taylor expanded in w around inf 26.1%
neg-mul-126.1%
distribute-rgt-neg-in26.1%
Simplified26.1%
if -500 < w < 1560Initial program 98.9%
Taylor expanded in w around 0 94.9%
if 1560 < w Initial program 100.0%
exp-neg100.0%
remove-double-neg100.0%
associate-*l/100.0%
*-lft-identity100.0%
remove-double-neg100.0%
Simplified100.0%
add-sqr-sqrt100.0%
sqrt-unprod100.0%
sqr-neg100.0%
sqrt-unprod0.0%
add-sqr-sqrt100.0%
add-sqr-sqrt100.0%
sqrt-unprod100.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
pow10.0%
exp-neg0.0%
inv-pow0.0%
pow-prod-up100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in w around 0 3.5%
mul-1-neg3.5%
unsub-neg3.5%
Simplified3.5%
Taylor expanded in w around inf 3.5%
neg-mul-13.5%
distribute-rgt-neg-in3.5%
Simplified3.5%
add-sqr-sqrt0.0%
sqrt-unprod3.1%
sqr-neg3.1%
sqrt-unprod3.5%
add-sqr-sqrt3.5%
add-log-exp1.6%
pow11.6%
pow11.6%
add-sqr-sqrt1.6%
sqrt-unprod1.6%
sqr-neg1.6%
sqrt-unprod0.0%
add-sqr-sqrt1.6%
add-sqr-sqrt1.6%
sqrt-unprod1.6%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
pow10.0%
exp-neg0.0%
inv-pow0.0%
pow-prod-up100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Final simplification78.0%
(FPCore (w l) :precision binary64 (if (<= w 0.86) (- l (* w l)) (* l 0.0)))
double code(double w, double l) {
double tmp;
if (w <= 0.86) {
tmp = l - (w * l);
} else {
tmp = l * 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.86d0) then
tmp = l - (w * l)
else
tmp = l * 0.0d0
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= 0.86) {
tmp = l - (w * l);
} else {
tmp = l * 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 0.86: tmp = l - (w * l) else: tmp = l * 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 0.86) tmp = Float64(l - Float64(w * l)); else tmp = Float64(l * 0.0); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 0.86) tmp = l - (w * l); else tmp = l * 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 0.86], N[(l - N[(w * l), $MachinePrecision]), $MachinePrecision], N[(l * 0.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 0.86:\\
\;\;\;\;\ell - w \cdot \ell\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot 0\\
\end{array}
\end{array}
if w < 0.859999999999999987Initial program 99.6%
exp-neg99.6%
remove-double-neg99.6%
associate-*l/99.6%
*-lft-identity99.6%
remove-double-neg99.6%
Simplified99.6%
add-sqr-sqrt31.4%
sqrt-unprod78.9%
sqr-neg78.9%
sqrt-unprod47.6%
add-sqr-sqrt78.0%
add-sqr-sqrt78.0%
sqrt-unprod78.0%
add-sqr-sqrt47.6%
sqrt-unprod78.0%
sqr-neg78.0%
sqrt-unprod30.5%
add-sqr-sqrt67.9%
pow167.9%
exp-neg67.9%
inv-pow67.9%
pow-prod-up96.8%
metadata-eval96.8%
metadata-eval96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Taylor expanded in w around 0 75.4%
mul-1-neg75.4%
unsub-neg75.4%
Simplified75.4%
if 0.859999999999999987 < w Initial program 96.8%
exp-neg96.8%
remove-double-neg96.8%
associate-*l/96.8%
*-lft-identity96.8%
remove-double-neg96.8%
Simplified96.8%
add-sqr-sqrt96.8%
sqrt-unprod96.8%
sqr-neg96.8%
sqrt-unprod0.0%
add-sqr-sqrt96.8%
add-sqr-sqrt96.8%
sqrt-unprod96.8%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
pow10.0%
exp-neg0.0%
inv-pow0.0%
pow-prod-up96.8%
metadata-eval96.8%
metadata-eval96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Taylor expanded in w around 0 3.4%
mul-1-neg3.4%
unsub-neg3.4%
Simplified3.4%
Taylor expanded in w around inf 3.4%
neg-mul-13.4%
distribute-rgt-neg-in3.4%
Simplified3.4%
add-sqr-sqrt0.0%
sqrt-unprod3.1%
sqr-neg3.1%
sqrt-unprod3.5%
add-sqr-sqrt3.5%
add-log-exp4.7%
pow14.7%
pow14.7%
add-sqr-sqrt4.7%
sqrt-unprod4.7%
sqr-neg4.7%
sqrt-unprod0.0%
add-sqr-sqrt1.5%
add-sqr-sqrt1.5%
sqrt-unprod1.5%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
pow10.0%
exp-neg0.0%
inv-pow0.0%
pow-prod-up96.8%
metadata-eval96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Final simplification78.0%
(FPCore (w l) :precision binary64 (if (<= w 0.86) (* l (- 1.0 w)) (* l 0.0)))
double code(double w, double l) {
double tmp;
if (w <= 0.86) {
tmp = l * (1.0 - w);
} else {
tmp = l * 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.86d0) then
tmp = l * (1.0d0 - w)
else
tmp = l * 0.0d0
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= 0.86) {
tmp = l * (1.0 - w);
} else {
tmp = l * 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 0.86: tmp = l * (1.0 - w) else: tmp = l * 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 0.86) tmp = Float64(l * Float64(1.0 - w)); else tmp = Float64(l * 0.0); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 0.86) tmp = l * (1.0 - w); else tmp = l * 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 0.86], N[(l * N[(1.0 - w), $MachinePrecision]), $MachinePrecision], N[(l * 0.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 0.86:\\
\;\;\;\;\ell \cdot \left(1 - w\right)\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot 0\\
\end{array}
\end{array}
if w < 0.859999999999999987Initial program 99.6%
exp-neg99.6%
remove-double-neg99.6%
associate-*l/99.6%
*-lft-identity99.6%
remove-double-neg99.6%
Simplified99.6%
add-sqr-sqrt31.4%
sqrt-unprod78.9%
sqr-neg78.9%
sqrt-unprod47.6%
add-sqr-sqrt78.0%
add-sqr-sqrt78.0%
sqrt-unprod78.0%
add-sqr-sqrt47.6%
sqrt-unprod78.0%
sqr-neg78.0%
sqrt-unprod30.5%
add-sqr-sqrt67.9%
pow167.9%
exp-neg67.9%
inv-pow67.9%
pow-prod-up96.8%
metadata-eval96.8%
metadata-eval96.8%
metadata-eval96.8%
Applied egg-rr96.8%
frac-2neg96.8%
div-inv96.8%
*-rgt-identity96.8%
Applied egg-rr96.8%
Taylor expanded in w around 0 75.4%
neg-mul-175.4%
sub-neg75.4%
*-rgt-identity75.4%
distribute-lft-out--75.4%
Simplified75.4%
if 0.859999999999999987 < w Initial program 96.8%
exp-neg96.8%
remove-double-neg96.8%
associate-*l/96.8%
*-lft-identity96.8%
remove-double-neg96.8%
Simplified96.8%
add-sqr-sqrt96.8%
sqrt-unprod96.8%
sqr-neg96.8%
sqrt-unprod0.0%
add-sqr-sqrt96.8%
add-sqr-sqrt96.8%
sqrt-unprod96.8%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
pow10.0%
exp-neg0.0%
inv-pow0.0%
pow-prod-up96.8%
metadata-eval96.8%
metadata-eval96.8%
metadata-eval96.8%
Applied egg-rr96.8%
Taylor expanded in w around 0 3.4%
mul-1-neg3.4%
unsub-neg3.4%
Simplified3.4%
Taylor expanded in w around inf 3.4%
neg-mul-13.4%
distribute-rgt-neg-in3.4%
Simplified3.4%
add-sqr-sqrt0.0%
sqrt-unprod3.1%
sqr-neg3.1%
sqrt-unprod3.5%
add-sqr-sqrt3.5%
add-log-exp4.7%
pow14.7%
pow14.7%
add-sqr-sqrt4.7%
sqrt-unprod4.7%
sqr-neg4.7%
sqrt-unprod0.0%
add-sqr-sqrt1.5%
add-sqr-sqrt1.5%
sqrt-unprod1.5%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
pow10.0%
exp-neg0.0%
inv-pow0.0%
pow-prod-up96.8%
metadata-eval96.8%
metadata-eval96.8%
Applied egg-rr96.8%
(FPCore (w l) :precision binary64 (if (<= w 1560.0) l (* l 0.0)))
double code(double w, double l) {
double tmp;
if (w <= 1560.0) {
tmp = l;
} else {
tmp = l * 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 <= 1560.0d0) then
tmp = l
else
tmp = l * 0.0d0
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= 1560.0) {
tmp = l;
} else {
tmp = l * 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 1560.0: tmp = l else: tmp = l * 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 1560.0) tmp = l; else tmp = Float64(l * 0.0); end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 1560.0) tmp = l; else tmp = l * 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 1560.0], l, N[(l * 0.0), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 1560:\\
\;\;\;\;\ell\\
\mathbf{else}:\\
\;\;\;\;\ell \cdot 0\\
\end{array}
\end{array}
if w < 1560Initial program 99.2%
Taylor expanded in w around 0 68.6%
if 1560 < w Initial program 100.0%
exp-neg100.0%
remove-double-neg100.0%
associate-*l/100.0%
*-lft-identity100.0%
remove-double-neg100.0%
Simplified100.0%
add-sqr-sqrt100.0%
sqrt-unprod100.0%
sqr-neg100.0%
sqrt-unprod0.0%
add-sqr-sqrt100.0%
add-sqr-sqrt100.0%
sqrt-unprod100.0%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
pow10.0%
exp-neg0.0%
inv-pow0.0%
pow-prod-up100.0%
metadata-eval100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
Taylor expanded in w around 0 3.5%
mul-1-neg3.5%
unsub-neg3.5%
Simplified3.5%
Taylor expanded in w around inf 3.5%
neg-mul-13.5%
distribute-rgt-neg-in3.5%
Simplified3.5%
add-sqr-sqrt0.0%
sqrt-unprod3.1%
sqr-neg3.1%
sqrt-unprod3.5%
add-sqr-sqrt3.5%
add-log-exp1.6%
pow11.6%
pow11.6%
add-sqr-sqrt1.6%
sqrt-unprod1.6%
sqr-neg1.6%
sqrt-unprod0.0%
add-sqr-sqrt1.6%
add-sqr-sqrt1.6%
sqrt-unprod1.6%
add-sqr-sqrt0.0%
sqrt-unprod0.0%
sqr-neg0.0%
sqrt-unprod0.0%
add-sqr-sqrt0.0%
pow10.0%
exp-neg0.0%
inv-pow0.0%
pow-prod-up100.0%
metadata-eval100.0%
metadata-eval100.0%
Applied egg-rr100.0%
(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.3%
Taylor expanded in w around 0 61.2%
herbie shell --seed 2024165
(FPCore (w l)
:name "exp-w (used to crash)"
:precision binary64
(* (exp (- w)) (pow l (exp w))))