
(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 17 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-unprod56.1%
sqr-neg56.1%
sqrt-unprod56.1%
add-sqr-sqrt56.1%
add-sqr-sqrt56.1%
sqrt-unprod56.1%
add-sqr-sqrt56.1%
sqrt-unprod56.1%
sqr-neg56.1%
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 l around 0 100.0%
if -1.6000000000000001 < w Initial program 99.1%
exp-neg99.1%
remove-double-neg99.1%
associate-*l/99.1%
*-lft-identity99.1%
remove-double-neg99.1%
Simplified99.1%
Taylor expanded in w around 0 99.0%
*-commutative99.0%
Simplified99.0%
Final simplification99.2%
(FPCore (w l) :precision binary64 (if (<= w -245.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 <= -245.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 <= (-245.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 <= -245.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 <= -245.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 <= -245.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 <= -245.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, -245.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 -245:\\
\;\;\;\;\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 < -245Initial 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-unprod56.1%
sqr-neg56.1%
sqrt-unprod56.1%
add-sqr-sqrt56.1%
add-sqr-sqrt56.1%
sqrt-unprod56.1%
add-sqr-sqrt56.1%
sqrt-unprod56.1%
sqr-neg56.1%
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 l around 0 100.0%
if -245 < w Initial program 99.1%
exp-neg99.1%
remove-double-neg99.1%
associate-*l/99.1%
*-lft-identity99.1%
remove-double-neg99.1%
Simplified99.1%
Taylor expanded in w around 0 98.8%
*-commutative98.8%
Simplified98.8%
(FPCore (w l) :precision binary64 (if (<= w -1.0) (/ l (exp w)) (/ (pow l (exp w)) (+ w 1.0))))
double code(double w, double l) {
double tmp;
if (w <= -1.0) {
tmp = l / exp(w);
} else {
tmp = pow(l, exp(w)) / (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 ** exp(w)) / (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, Math.exp(w)) / (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, math.exp(w)) / (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 ^ exp(w)) / 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 ^ exp(w)) / (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[Exp[w], $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(e^{w}\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-unprod56.1%
sqr-neg56.1%
sqrt-unprod56.1%
add-sqr-sqrt56.1%
add-sqr-sqrt56.1%
sqrt-unprod56.1%
add-sqr-sqrt56.1%
sqrt-unprod56.1%
sqr-neg56.1%
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 l around 0 100.0%
if -1 < w Initial program 99.1%
exp-neg99.1%
remove-double-neg99.1%
associate-*l/99.1%
*-lft-identity99.1%
remove-double-neg99.1%
Simplified99.1%
Taylor expanded in w around 0 98.7%
+-commutative98.7%
Simplified98.7%
(FPCore (w l)
:precision binary64
(if (<= l 1.0)
(*
(- 1.0 w)
(pow l (- 1.0 (* w (- -1.0 (* w (+ 0.5 (* w 0.16666666666666666))))))))
(*
(+ 1.0 (* w (+ -1.0 (* w 0.5))))
(pow l (+ 1.0 (* w (+ 1.0 (* w 0.5))))))))
double code(double w, double l) {
double tmp;
if (l <= 1.0) {
tmp = (1.0 - w) * pow(l, (1.0 - (w * (-1.0 - (w * (0.5 + (w * 0.16666666666666666)))))));
} else {
tmp = (1.0 + (w * (-1.0 + (w * 0.5)))) * pow(l, (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 (l <= 1.0d0) then
tmp = (1.0d0 - w) * (l ** (1.0d0 - (w * ((-1.0d0) - (w * (0.5d0 + (w * 0.16666666666666666d0)))))))
else
tmp = (1.0d0 + (w * ((-1.0d0) + (w * 0.5d0)))) * (l ** (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 (l <= 1.0) {
tmp = (1.0 - w) * Math.pow(l, (1.0 - (w * (-1.0 - (w * (0.5 + (w * 0.16666666666666666)))))));
} else {
tmp = (1.0 + (w * (-1.0 + (w * 0.5)))) * Math.pow(l, (1.0 + (w * (1.0 + (w * 0.5)))));
}
return tmp;
}
def code(w, l): tmp = 0 if l <= 1.0: tmp = (1.0 - w) * math.pow(l, (1.0 - (w * (-1.0 - (w * (0.5 + (w * 0.16666666666666666))))))) else: tmp = (1.0 + (w * (-1.0 + (w * 0.5)))) * math.pow(l, (1.0 + (w * (1.0 + (w * 0.5))))) return tmp
function code(w, l) tmp = 0.0 if (l <= 1.0) tmp = Float64(Float64(1.0 - w) * (l ^ Float64(1.0 - Float64(w * Float64(-1.0 - Float64(w * Float64(0.5 + Float64(w * 0.16666666666666666)))))))); else tmp = Float64(Float64(1.0 + Float64(w * Float64(-1.0 + Float64(w * 0.5)))) * (l ^ 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 (l <= 1.0) tmp = (1.0 - w) * (l ^ (1.0 - (w * (-1.0 - (w * (0.5 + (w * 0.16666666666666666))))))); else tmp = (1.0 + (w * (-1.0 + (w * 0.5)))) * (l ^ (1.0 + (w * (1.0 + (w * 0.5))))); end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[l, 1.0], N[(N[(1.0 - w), $MachinePrecision] * 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]), $MachinePrecision], N[(N[(1.0 + N[(w * N[(-1.0 + N[(w * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[l, N[(1.0 + N[(w * N[(1.0 + N[(w * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\ell \leq 1:\\
\;\;\;\;\left(1 - w\right) \cdot {\ell}^{\left(1 - w \cdot \left(-1 - w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(1 + w \cdot \left(-1 + w \cdot 0.5\right)\right) \cdot {\ell}^{\left(1 + w \cdot \left(1 + w \cdot 0.5\right)\right)}\\
\end{array}
\end{array}
if l < 1Initial program 99.7%
Taylor expanded in w around 0 81.1%
neg-mul-181.1%
unsub-neg81.1%
Simplified81.1%
Taylor expanded in w around 0 99.5%
*-commutative80.7%
Simplified99.5%
if 1 < l Initial program 98.7%
Taylor expanded in w around 0 80.5%
Taylor expanded in w around 0 98.2%
*-commutative64.2%
Simplified98.2%
Final simplification99.0%
(FPCore (w l)
:precision binary64
(if (<= l 1.0)
(*
(- 1.0 w)
(pow l (- 1.0 (* w (- -1.0 (* w (+ 0.5 (* w 0.16666666666666666))))))))
(pow l (+ 1.0 (* w (+ 1.0 (* w 0.5)))))))
double code(double w, double l) {
double tmp;
if (l <= 1.0) {
tmp = (1.0 - w) * pow(l, (1.0 - (w * (-1.0 - (w * (0.5 + (w * 0.16666666666666666)))))));
} else {
tmp = pow(l, (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 (l <= 1.0d0) then
tmp = (1.0d0 - w) * (l ** (1.0d0 - (w * ((-1.0d0) - (w * (0.5d0 + (w * 0.16666666666666666d0)))))))
else
tmp = l ** (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 (l <= 1.0) {
tmp = (1.0 - w) * Math.pow(l, (1.0 - (w * (-1.0 - (w * (0.5 + (w * 0.16666666666666666)))))));
} else {
tmp = Math.pow(l, (1.0 + (w * (1.0 + (w * 0.5)))));
}
return tmp;
}
def code(w, l): tmp = 0 if l <= 1.0: tmp = (1.0 - w) * math.pow(l, (1.0 - (w * (-1.0 - (w * (0.5 + (w * 0.16666666666666666))))))) else: tmp = math.pow(l, (1.0 + (w * (1.0 + (w * 0.5))))) return tmp
function code(w, l) tmp = 0.0 if (l <= 1.0) tmp = Float64(Float64(1.0 - w) * (l ^ Float64(1.0 - Float64(w * Float64(-1.0 - Float64(w * Float64(0.5 + Float64(w * 0.16666666666666666)))))))); else tmp = l ^ 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 (l <= 1.0) tmp = (1.0 - w) * (l ^ (1.0 - (w * (-1.0 - (w * (0.5 + (w * 0.16666666666666666))))))); else tmp = l ^ (1.0 + (w * (1.0 + (w * 0.5)))); end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[l, 1.0], N[(N[(1.0 - w), $MachinePrecision] * 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]), $MachinePrecision], N[Power[l, 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}\;\ell \leq 1:\\
\;\;\;\;\left(1 - w\right) \cdot {\ell}^{\left(1 - w \cdot \left(-1 - w \cdot \left(0.5 + w \cdot 0.16666666666666666\right)\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;{\ell}^{\left(1 + w \cdot \left(1 + w \cdot 0.5\right)\right)}\\
\end{array}
\end{array}
if l < 1Initial program 99.7%
Taylor expanded in w around 0 81.1%
neg-mul-181.1%
unsub-neg81.1%
Simplified81.1%
Taylor expanded in w around 0 99.5%
*-commutative80.7%
Simplified99.5%
if 1 < l Initial program 98.7%
Taylor expanded in w around 0 64.2%
Taylor expanded in w around 0 98.0%
*-commutative64.2%
Simplified98.0%
Final simplification98.9%
(FPCore (w l) :precision binary64 (if (<= l 1.0) (* (- 1.0 w) (pow l (+ w 1.0))) (pow l (+ 1.0 (* w (+ 1.0 (* w 0.5)))))))
double code(double w, double l) {
double tmp;
if (l <= 1.0) {
tmp = (1.0 - w) * pow(l, (w + 1.0));
} else {
tmp = pow(l, (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 (l <= 1.0d0) then
tmp = (1.0d0 - w) * (l ** (w + 1.0d0))
else
tmp = l ** (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 (l <= 1.0) {
tmp = (1.0 - w) * Math.pow(l, (w + 1.0));
} else {
tmp = Math.pow(l, (1.0 + (w * (1.0 + (w * 0.5)))));
}
return tmp;
}
def code(w, l): tmp = 0 if l <= 1.0: tmp = (1.0 - w) * math.pow(l, (w + 1.0)) else: tmp = math.pow(l, (1.0 + (w * (1.0 + (w * 0.5))))) return tmp
function code(w, l) tmp = 0.0 if (l <= 1.0) tmp = Float64(Float64(1.0 - w) * (l ^ Float64(w + 1.0))); else tmp = l ^ 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 (l <= 1.0) tmp = (1.0 - w) * (l ^ (w + 1.0)); else tmp = l ^ (1.0 + (w * (1.0 + (w * 0.5)))); end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[l, 1.0], N[(N[(1.0 - w), $MachinePrecision] * N[Power[l, N[(w + 1.0), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[Power[l, 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}\;\ell \leq 1:\\
\;\;\;\;\left(1 - w\right) \cdot {\ell}^{\left(w + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;{\ell}^{\left(1 + w \cdot \left(1 + w \cdot 0.5\right)\right)}\\
\end{array}
\end{array}
if l < 1Initial program 99.7%
Taylor expanded in w around 0 81.1%
neg-mul-181.1%
unsub-neg81.1%
Simplified81.1%
Taylor expanded in w around 0 99.2%
+-commutative80.4%
Simplified99.2%
if 1 < l Initial program 98.7%
Taylor expanded in w around 0 64.2%
Taylor expanded in w around 0 98.0%
*-commutative64.2%
Simplified98.0%
Final simplification98.7%
(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-sqrt45.6%
sqrt-unprod86.9%
sqr-neg86.9%
sqrt-unprod41.4%
add-sqr-sqrt85.7%
add-sqr-sqrt85.7%
sqrt-unprod85.7%
add-sqr-sqrt41.4%
sqrt-unprod68.1%
sqr-neg68.1%
sqrt-unprod26.7%
add-sqr-sqrt53.7%
pow153.7%
exp-neg53.7%
inv-pow53.7%
pow-prod-up97.1%
metadata-eval97.1%
metadata-eval97.1%
metadata-eval97.1%
Applied egg-rr97.1%
Taylor expanded in l around 0 97.1%
(FPCore (w l)
:precision binary64
(if (<= w 0.245)
(-
l
(*
w
(+
l
(*
w
(+
(- (* l 0.5) l)
(* w (+ (- l (* l 0.5)) (+ (* l 0.16666666666666666) (* l -0.5)))))))))
0.0))
double code(double w, double l) {
double tmp;
if (w <= 0.245) {
tmp = l - (w * (l + (w * (((l * 0.5) - l) + (w * ((l - (l * 0.5)) + ((l * 0.16666666666666666) + (l * -0.5))))))));
} 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.245d0) then
tmp = l - (w * (l + (w * (((l * 0.5d0) - l) + (w * ((l - (l * 0.5d0)) + ((l * 0.16666666666666666d0) + (l * (-0.5d0)))))))))
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= 0.245) {
tmp = l - (w * (l + (w * (((l * 0.5) - l) + (w * ((l - (l * 0.5)) + ((l * 0.16666666666666666) + (l * -0.5))))))));
} else {
tmp = 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 0.245: tmp = l - (w * (l + (w * (((l * 0.5) - l) + (w * ((l - (l * 0.5)) + ((l * 0.16666666666666666) + (l * -0.5)))))))) else: tmp = 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 0.245) tmp = Float64(l - Float64(w * Float64(l + Float64(w * Float64(Float64(Float64(l * 0.5) - l) + Float64(w * Float64(Float64(l - Float64(l * 0.5)) + Float64(Float64(l * 0.16666666666666666) + Float64(l * -0.5))))))))); else tmp = 0.0; end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 0.245) tmp = l - (w * (l + (w * (((l * 0.5) - l) + (w * ((l - (l * 0.5)) + ((l * 0.16666666666666666) + (l * -0.5)))))))); else tmp = 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 0.245], N[(l - N[(w * N[(l + N[(w * N[(N[(N[(l * 0.5), $MachinePrecision] - l), $MachinePrecision] + N[(w * N[(N[(l - N[(l * 0.5), $MachinePrecision]), $MachinePrecision] + N[(N[(l * 0.16666666666666666), $MachinePrecision] + N[(l * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 0.245:\\
\;\;\;\;\ell - w \cdot \left(\ell + w \cdot \left(\left(\ell \cdot 0.5 - \ell\right) + w \cdot \left(\left(\ell - \ell \cdot 0.5\right) + \left(\ell \cdot 0.16666666666666666 + \ell \cdot -0.5\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if w < 0.245Initial 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-sqrt33.5%
sqrt-unprod84.4%
sqr-neg84.4%
sqrt-unprod50.9%
add-sqr-sqrt83.7%
add-sqr-sqrt83.7%
sqrt-unprod83.7%
add-sqr-sqrt50.9%
sqrt-unprod83.8%
sqr-neg83.8%
sqrt-unprod32.8%
add-sqr-sqrt66.0%
pow166.0%
exp-neg66.0%
inv-pow66.0%
pow-prod-up97.8%
metadata-eval97.8%
metadata-eval97.8%
metadata-eval97.8%
Applied egg-rr97.8%
Taylor expanded in w around 0 85.4%
if 0.245 < w Initial program 97.9%
add-sqr-sqrt97.9%
sqrt-unprod97.9%
add-sqr-sqrt0.0%
sqrt-unprod4.2%
sqr-neg4.2%
sqrt-unprod4.2%
add-sqr-sqrt4.2%
pow14.2%
exp-neg4.2%
inv-pow4.2%
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-rr91.9%
Taylor expanded in l around 0 95.9%
metadata-eval95.9%
Applied egg-rr95.9%
Final simplification87.3%
(FPCore (w l) :precision binary64 (if (<= w 1.8) (* l (+ 1.0 (* w (+ -1.0 (* w 0.5))))) 0.0))
double code(double w, double l) {
double tmp;
if (w <= 1.8) {
tmp = l * (1.0 + (w * (-1.0 + (w * 0.5))));
} 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 <= 1.8d0) then
tmp = l * (1.0d0 + (w * ((-1.0d0) + (w * 0.5d0))))
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= 1.8) {
tmp = l * (1.0 + (w * (-1.0 + (w * 0.5))));
} else {
tmp = 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 1.8: tmp = l * (1.0 + (w * (-1.0 + (w * 0.5)))) else: tmp = 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 1.8) tmp = Float64(l * Float64(1.0 + Float64(w * Float64(-1.0 + Float64(w * 0.5))))); else tmp = 0.0; end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 1.8) tmp = l * (1.0 + (w * (-1.0 + (w * 0.5)))); else tmp = 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 1.8], N[(l * N[(1.0 + N[(w * N[(-1.0 + N[(w * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 1.8:\\
\;\;\;\;\ell \cdot \left(1 + w \cdot \left(-1 + w \cdot 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if w < 1.80000000000000004Initial program 99.7%
Taylor expanded in w around 0 82.6%
add-sqr-sqrt33.8%
sqrt-unprod84.5%
sqr-neg84.5%
sqrt-unprod50.7%
add-sqr-sqrt83.4%
add-sqr-sqrt83.4%
sqrt-unprod83.4%
add-sqr-sqrt50.7%
sqrt-unprod83.4%
sqr-neg83.4%
sqrt-unprod32.7%
add-sqr-sqrt65.7%
pow165.7%
exp-neg65.7%
inv-pow65.7%
pow-prod-up97.3%
metadata-eval97.3%
metadata-eval97.3%
metadata-eval97.3%
Applied egg-rr83.2%
if 1.80000000000000004 < w Initial program 97.9%
add-sqr-sqrt97.9%
sqrt-unprod97.9%
add-sqr-sqrt0.0%
sqrt-unprod2.1%
sqr-neg2.1%
sqrt-unprod2.1%
add-sqr-sqrt2.1%
pow12.1%
exp-neg2.1%
inv-pow2.1%
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-rr91.8%
Taylor expanded in l around 0 97.9%
metadata-eval97.9%
Applied egg-rr97.9%
Final simplification85.9%
(FPCore (w l) :precision binary64 (if (<= w 1.8) (- l (* w (+ l (* w (* l -0.5))))) 0.0))
double code(double w, double l) {
double tmp;
if (w <= 1.8) {
tmp = l - (w * (l + (w * (l * -0.5))));
} 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 <= 1.8d0) then
tmp = l - (w * (l + (w * (l * (-0.5d0)))))
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= 1.8) {
tmp = l - (w * (l + (w * (l * -0.5))));
} else {
tmp = 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 1.8: tmp = l - (w * (l + (w * (l * -0.5)))) else: tmp = 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 1.8) tmp = Float64(l - Float64(w * Float64(l + Float64(w * Float64(l * -0.5))))); else tmp = 0.0; end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 1.8) tmp = l - (w * (l + (w * (l * -0.5)))); else tmp = 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 1.8], N[(l - N[(w * N[(l + N[(w * N[(l * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 1.8:\\
\;\;\;\;\ell - w \cdot \left(\ell + w \cdot \left(\ell \cdot -0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if w < 1.80000000000000004Initial program 99.7%
exp-neg99.7%
remove-double-neg99.7%
associate-*l/99.6%
*-lft-identity99.6%
remove-double-neg99.6%
Simplified99.6%
add-sqr-sqrt33.8%
sqrt-unprod84.5%
sqr-neg84.5%
sqrt-unprod50.7%
add-sqr-sqrt83.4%
add-sqr-sqrt83.4%
sqrt-unprod83.4%
add-sqr-sqrt50.7%
sqrt-unprod83.4%
sqr-neg83.4%
sqrt-unprod32.7%
add-sqr-sqrt65.7%
pow165.7%
exp-neg65.7%
inv-pow65.7%
pow-prod-up97.3%
metadata-eval97.3%
metadata-eval97.3%
metadata-eval97.3%
Applied egg-rr97.3%
Taylor expanded in w around 0 79.6%
associate-*r*79.6%
neg-mul-179.6%
distribute-rgt-out79.6%
metadata-eval79.6%
Simplified79.6%
if 1.80000000000000004 < w Initial program 97.9%
add-sqr-sqrt97.9%
sqrt-unprod97.9%
add-sqr-sqrt0.0%
sqrt-unprod2.1%
sqr-neg2.1%
sqrt-unprod2.1%
add-sqr-sqrt2.1%
pow12.1%
exp-neg2.1%
inv-pow2.1%
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-rr91.8%
Taylor expanded in l around 0 97.9%
metadata-eval97.9%
Applied egg-rr97.9%
Final simplification82.9%
(FPCore (w l) :precision binary64 (if (<= w -0.95) (* w (- l)) (if (<= w 1.8) l 0.0)))
double code(double w, double l) {
double tmp;
if (w <= -0.95) {
tmp = w * -l;
} else if (w <= 1.8) {
tmp = l;
} 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.95d0)) then
tmp = w * -l
else if (w <= 1.8d0) then
tmp = l
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= -0.95) {
tmp = w * -l;
} else if (w <= 1.8) {
tmp = l;
} else {
tmp = 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= -0.95: tmp = w * -l elif w <= 1.8: tmp = l else: tmp = 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= -0.95) tmp = Float64(w * Float64(-l)); elseif (w <= 1.8) tmp = l; else tmp = 0.0; end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= -0.95) tmp = w * -l; elseif (w <= 1.8) tmp = l; else tmp = 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, -0.95], N[(w * (-l)), $MachinePrecision], If[LessEqual[w, 1.8], l, 0.0]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq -0.95:\\
\;\;\;\;w \cdot \left(-\ell\right)\\
\mathbf{elif}\;w \leq 1.8:\\
\;\;\;\;\ell\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if w < -0.94999999999999996Initial 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-unprod55.3%
sqr-neg55.3%
sqrt-unprod55.3%
add-sqr-sqrt55.3%
add-sqr-sqrt55.3%
sqrt-unprod55.3%
add-sqr-sqrt55.3%
sqrt-unprod55.3%
sqr-neg55.3%
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 w around 0 27.1%
mul-1-neg27.1%
unsub-neg27.1%
Simplified27.1%
Taylor expanded in w around inf 27.1%
mul-1-neg27.1%
distribute-rgt-neg-in27.1%
Simplified27.1%
if -0.94999999999999996 < w < 1.80000000000000004Initial program 99.5%
Taylor expanded in w around 0 96.7%
if 1.80000000000000004 < w Initial program 97.9%
add-sqr-sqrt97.9%
sqrt-unprod97.9%
add-sqr-sqrt0.0%
sqrt-unprod2.1%
sqr-neg2.1%
sqrt-unprod2.1%
add-sqr-sqrt2.1%
pow12.1%
exp-neg2.1%
inv-pow2.1%
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-rr91.8%
Taylor expanded in l around 0 97.9%
metadata-eval97.9%
Applied egg-rr97.9%
Final simplification78.7%
(FPCore (w l) :precision binary64 (if (<= w 0.23) (- l (* w l)) 0.0))
double code(double w, double l) {
double tmp;
if (w <= 0.23) {
tmp = l - (w * l);
} 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.23d0) then
tmp = l - (w * l)
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= 0.23) {
tmp = l - (w * l);
} else {
tmp = 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 0.23: tmp = l - (w * l) else: tmp = 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 0.23) tmp = Float64(l - Float64(w * l)); else tmp = 0.0; end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 0.23) tmp = l - (w * l); else tmp = 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 0.23], N[(l - N[(w * l), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 0.23:\\
\;\;\;\;\ell - w \cdot \ell\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if w < 0.23000000000000001Initial 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-sqrt33.5%
sqrt-unprod84.4%
sqr-neg84.4%
sqrt-unprod50.9%
add-sqr-sqrt83.7%
add-sqr-sqrt83.7%
sqrt-unprod83.7%
add-sqr-sqrt50.9%
sqrt-unprod83.8%
sqr-neg83.8%
sqrt-unprod32.8%
add-sqr-sqrt66.0%
pow166.0%
exp-neg66.0%
inv-pow66.0%
pow-prod-up97.8%
metadata-eval97.8%
metadata-eval97.8%
metadata-eval97.8%
Applied egg-rr97.8%
Taylor expanded in w around 0 74.7%
mul-1-neg74.7%
unsub-neg74.7%
Simplified74.7%
if 0.23000000000000001 < w Initial program 97.9%
add-sqr-sqrt97.9%
sqrt-unprod97.9%
add-sqr-sqrt0.0%
sqrt-unprod4.2%
sqr-neg4.2%
sqrt-unprod4.2%
add-sqr-sqrt4.2%
pow14.2%
exp-neg4.2%
inv-pow4.2%
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-rr91.9%
Taylor expanded in l around 0 95.9%
metadata-eval95.9%
Applied egg-rr95.9%
Final simplification78.7%
(FPCore (w l) :precision binary64 (if (<= w 0.2) (* l (- 1.0 w)) 0.0))
double code(double w, double l) {
double tmp;
if (w <= 0.2) {
tmp = l * (1.0 - w);
} 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.2d0) then
tmp = l * (1.0d0 - w)
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= 0.2) {
tmp = l * (1.0 - w);
} else {
tmp = 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 0.2: tmp = l * (1.0 - w) else: tmp = 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 0.2) tmp = Float64(l * Float64(1.0 - w)); else tmp = 0.0; end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 0.2) tmp = l * (1.0 - w); else tmp = 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 0.2], N[(l * N[(1.0 - w), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 0.2:\\
\;\;\;\;\ell \cdot \left(1 - w\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if w < 0.20000000000000001Initial 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-sqrt33.5%
sqrt-unprod84.4%
sqr-neg84.4%
sqrt-unprod50.9%
add-sqr-sqrt83.7%
add-sqr-sqrt83.7%
sqrt-unprod83.7%
add-sqr-sqrt50.9%
sqrt-unprod83.8%
sqr-neg83.8%
sqrt-unprod32.8%
add-sqr-sqrt66.0%
pow166.0%
exp-neg66.0%
inv-pow66.0%
pow-prod-up97.8%
metadata-eval97.8%
metadata-eval97.8%
metadata-eval97.8%
Applied egg-rr97.8%
Taylor expanded in w around 0 74.7%
mul-1-neg74.7%
unsub-neg74.7%
Simplified74.7%
Taylor expanded in l around 0 74.7%
if 0.20000000000000001 < w Initial program 97.9%
add-sqr-sqrt97.9%
sqrt-unprod97.9%
add-sqr-sqrt0.0%
sqrt-unprod4.2%
sqr-neg4.2%
sqrt-unprod4.2%
add-sqr-sqrt4.2%
pow14.2%
exp-neg4.2%
inv-pow4.2%
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-rr91.9%
Taylor expanded in l around 0 95.9%
metadata-eval95.9%
Applied egg-rr95.9%
(FPCore (w l) :precision binary64 (if (<= w 1.8) l 0.0))
double code(double w, double l) {
double tmp;
if (w <= 1.8) {
tmp = l;
} 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 <= 1.8d0) then
tmp = l
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= 1.8) {
tmp = l;
} else {
tmp = 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 1.8: tmp = l else: tmp = 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 1.8) tmp = l; else tmp = 0.0; end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 1.8) tmp = l; else tmp = 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 1.8], l, 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 1.8:\\
\;\;\;\;\ell\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if w < 1.80000000000000004Initial program 99.7%
Taylor expanded in w around 0 67.0%
if 1.80000000000000004 < w Initial program 97.9%
add-sqr-sqrt97.9%
sqrt-unprod97.9%
add-sqr-sqrt0.0%
sqrt-unprod2.1%
sqr-neg2.1%
sqrt-unprod2.1%
add-sqr-sqrt2.1%
pow12.1%
exp-neg2.1%
inv-pow2.1%
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-rr91.8%
Taylor expanded in l around 0 97.9%
metadata-eval97.9%
Applied egg-rr97.9%
(FPCore (w l) :precision binary64 0.0)
double code(double w, double l) {
return 0.0;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
code = 0.0d0
end function
public static double code(double w, double l) {
return 0.0;
}
def code(w, l): return 0.0
function code(w, l) return 0.0 end
function tmp = code(w, l) tmp = 0.0; end
code[w_, l_] := 0.0
\begin{array}{l}
\\
0
\end{array}
Initial program 99.3%
add-sqr-sqrt99.3%
sqrt-unprod99.3%
add-sqr-sqrt53.8%
sqrt-unprod81.3%
sqr-neg81.3%
sqrt-unprod27.6%
add-sqr-sqrt54.8%
pow154.8%
exp-neg54.8%
inv-pow54.8%
pow-prod-up73.6%
metadata-eval73.6%
metadata-eval73.6%
metadata-eval73.6%
*-un-lft-identity73.6%
add-sqr-sqrt45.5%
sqrt-unprod87.1%
sqr-neg87.1%
sqrt-unprod41.6%
add-sqr-sqrt68.8%
Applied egg-rr35.6%
Taylor expanded in l around 0 20.5%
metadata-eval20.5%
Applied egg-rr20.5%
herbie shell --seed 2024160
(FPCore (w l)
:name "exp-w (used to crash)"
:precision binary64
(* (exp (- w)) (pow l (exp w))))