
(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 13 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 (- 0.0 w)) (pow l (exp w))))
double code(double w, double l) {
return exp((0.0 - w)) * pow(l, exp(w));
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
code = exp((0.0d0 - w)) * (l ** exp(w))
end function
public static double code(double w, double l) {
return Math.exp((0.0 - w)) * Math.pow(l, Math.exp(w));
}
def code(w, l): return math.exp((0.0 - w)) * math.pow(l, math.exp(w))
function code(w, l) return Float64(exp(Float64(0.0 - w)) * (l ^ exp(w))) end
function tmp = code(w, l) tmp = exp((0.0 - w)) * (l ^ exp(w)); end
code[w_, l_] := N[(N[Exp[N[(0.0 - w), $MachinePrecision]], $MachinePrecision] * N[Power[l, N[Exp[w], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
e^{0 - w} \cdot {\ell}^{\left(e^{w}\right)}
\end{array}
Initial program 99.7%
Final simplification99.7%
(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%
Taylor expanded in w around inf
*-commutativeN/A
exp-to-powN/A
remove-double-negN/A
distribute-lft-neg-outN/A
log-recN/A
*-commutativeN/A
mul-1-negN/A
+-rgt-identityN/A
exp-sumN/A
+-rgt-identityN/A
unsub-negN/A
div-expN/A
/-lowering-/.f64N/A
Simplified99.7%
(FPCore (w l)
:precision binary64
(if (<= w -1.6)
(/ l (exp w))
(*
(pow l (exp w))
(/ 1.0 (+ 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 / (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 / (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 / (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 / (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(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 / (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[(1.0 + N[(w * N[(1.0 + N[(w * N[(0.5 + N[(w * 0.16666666666666666), $MachinePrecision]), $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}:\\
\;\;\;\;{\ell}^{\left(e^{w}\right)} \cdot \frac{1}{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%
Taylor expanded in w around inf
*-commutativeN/A
exp-to-powN/A
remove-double-negN/A
distribute-lft-neg-outN/A
log-recN/A
*-commutativeN/A
mul-1-negN/A
+-rgt-identityN/A
exp-sumN/A
+-rgt-identityN/A
unsub-negN/A
div-expN/A
/-lowering-/.f64N/A
Simplified100.0%
Taylor expanded in w around 0
Simplified100.0%
if -1.6000000000000001 < w Initial program 99.6%
Taylor expanded in w around inf
exp-negN/A
/-lowering-/.f64N/A
exp-lowering-exp.f6499.6%
Simplified99.6%
Taylor expanded in w around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.1%
Simplified99.1%
Final simplification99.4%
(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%
Taylor expanded in w around inf
*-commutativeN/A
exp-to-powN/A
remove-double-negN/A
distribute-lft-neg-outN/A
log-recN/A
*-commutativeN/A
mul-1-negN/A
+-rgt-identityN/A
exp-sumN/A
+-rgt-identityN/A
unsub-negN/A
div-expN/A
/-lowering-/.f64N/A
Simplified100.0%
Taylor expanded in w around 0
Simplified100.0%
if -1.6000000000000001 < w Initial program 99.6%
Taylor expanded in w around inf
*-commutativeN/A
exp-to-powN/A
remove-double-negN/A
distribute-lft-neg-outN/A
log-recN/A
*-commutativeN/A
mul-1-negN/A
+-rgt-identityN/A
exp-sumN/A
+-rgt-identityN/A
unsub-negN/A
div-expN/A
/-lowering-/.f64N/A
Simplified99.6%
Taylor expanded in w around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6499.1%
Simplified99.1%
(FPCore (w l) :precision binary64 (* (exp (- 0.0 w)) l))
double code(double w, double l) {
return exp((0.0 - w)) * l;
}
real(8) function code(w, l)
real(8), intent (in) :: w
real(8), intent (in) :: l
code = exp((0.0d0 - w)) * l
end function
public static double code(double w, double l) {
return Math.exp((0.0 - w)) * l;
}
def code(w, l): return math.exp((0.0 - w)) * l
function code(w, l) return Float64(exp(Float64(0.0 - w)) * l) end
function tmp = code(w, l) tmp = exp((0.0 - w)) * l; end
code[w_, l_] := N[(N[Exp[N[(0.0 - w), $MachinePrecision]], $MachinePrecision] * l), $MachinePrecision]
\begin{array}{l}
\\
e^{0 - w} \cdot \ell
\end{array}
Initial program 99.7%
Taylor expanded in w around 0
Simplified97.7%
Final simplification97.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.7%
Taylor expanded in w around inf
*-commutativeN/A
exp-to-powN/A
remove-double-negN/A
distribute-lft-neg-outN/A
log-recN/A
*-commutativeN/A
mul-1-negN/A
+-rgt-identityN/A
exp-sumN/A
+-rgt-identityN/A
unsub-negN/A
div-expN/A
/-lowering-/.f64N/A
Simplified99.7%
Taylor expanded in w around 0
Simplified97.7%
(FPCore (w l) :precision binary64 (if (<= w 0.74) (+ l (* w (- (* w (- (* l 0.5) (* w (* l 0.16666666666666666)))) l))) 0.0))
double code(double w, double l) {
double tmp;
if (w <= 0.74) {
tmp = l + (w * ((w * ((l * 0.5) - (w * (l * 0.16666666666666666)))) - 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.74d0) then
tmp = l + (w * ((w * ((l * 0.5d0) - (w * (l * 0.16666666666666666d0)))) - l))
else
tmp = 0.0d0
end if
code = tmp
end function
public static double code(double w, double l) {
double tmp;
if (w <= 0.74) {
tmp = l + (w * ((w * ((l * 0.5) - (w * (l * 0.16666666666666666)))) - l));
} else {
tmp = 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 0.74: tmp = l + (w * ((w * ((l * 0.5) - (w * (l * 0.16666666666666666)))) - l)) else: tmp = 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 0.74) tmp = Float64(l + Float64(w * Float64(Float64(w * Float64(Float64(l * 0.5) - Float64(w * Float64(l * 0.16666666666666666)))) - l))); else tmp = 0.0; end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 0.74) tmp = l + (w * ((w * ((l * 0.5) - (w * (l * 0.16666666666666666)))) - l)); else tmp = 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 0.74], N[(l + N[(w * N[(N[(w * N[(N[(l * 0.5), $MachinePrecision] - N[(w * N[(l * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 0.74:\\
\;\;\;\;\ell + w \cdot \left(w \cdot \left(\ell \cdot 0.5 - w \cdot \left(\ell \cdot 0.16666666666666666\right)\right) - \ell\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if w < 0.73999999999999999Initial program 99.6%
Taylor expanded in w around inf
*-commutativeN/A
exp-to-powN/A
remove-double-negN/A
distribute-lft-neg-outN/A
log-recN/A
*-commutativeN/A
mul-1-negN/A
+-rgt-identityN/A
exp-sumN/A
+-rgt-identityN/A
unsub-negN/A
div-expN/A
/-lowering-/.f64N/A
Simplified99.6%
Taylor expanded in w around 0
Simplified97.7%
Taylor expanded in w around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
Simplified88.2%
if 0.73999999999999999 < w Initial program 100.0%
exp-negN/A
sqr-powN/A
pow-prod-upN/A
flip-+N/A
+-inversesN/A
metadata-evalN/A
metadata-evalN/A
mul0-lftN/A
*-commutativeN/A
*-commutativeN/A
mul0-lftN/A
metadata-evalN/A
+-inversesN/A
metadata-evalN/A
flip--N/A
metadata-evalN/A
metadata-evalN/A
associate-/r/N/A
div-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
Applied egg-rr97.3%
(FPCore (w l) :precision binary64 (if (<= w 245.0) (* l (+ 1.0 (* w (+ -1.0 (* w 0.5))))) 0.0))
double code(double w, double l) {
double tmp;
if (w <= 245.0) {
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 <= 245.0d0) 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 <= 245.0) {
tmp = l * (1.0 + (w * (-1.0 + (w * 0.5))));
} else {
tmp = 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 245.0: 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 <= 245.0) 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 <= 245.0) 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, 245.0], 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 245:\\
\;\;\;\;\ell \cdot \left(1 + w \cdot \left(-1 + w \cdot 0.5\right)\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if w < 245Initial program 99.6%
Taylor expanded in w around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
sub-negN/A
metadata-evalN/A
+-commutativeN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6485.4%
Simplified85.4%
Taylor expanded in w around 0
Simplified86.5%
if 245 < w Initial program 100.0%
exp-negN/A
sqr-powN/A
pow-prod-upN/A
flip-+N/A
+-inversesN/A
metadata-evalN/A
metadata-evalN/A
mul0-lftN/A
*-commutativeN/A
*-commutativeN/A
mul0-lftN/A
metadata-evalN/A
+-inversesN/A
metadata-evalN/A
flip--N/A
metadata-evalN/A
metadata-evalN/A
associate-/r/N/A
div-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
Applied egg-rr100.0%
Final simplification88.4%
(FPCore (w l) :precision binary64 (if (<= w 0.74) (* l (/ 1.0 (/ 1.0 (- 1.0 w)))) 0.0))
double code(double w, double l) {
double tmp;
if (w <= 0.74) {
tmp = l * (1.0 / (1.0 / (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.74d0) then
tmp = l * (1.0d0 / (1.0d0 / (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.74) {
tmp = l * (1.0 / (1.0 / (1.0 - w)));
} else {
tmp = 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 0.74: tmp = l * (1.0 / (1.0 / (1.0 - w))) else: tmp = 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 0.74) tmp = Float64(l * Float64(1.0 / Float64(1.0 / Float64(1.0 - w)))); else tmp = 0.0; end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 0.74) tmp = l * (1.0 / (1.0 / (1.0 - w))); else tmp = 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 0.74], N[(l * N[(1.0 / N[(1.0 / N[(1.0 - w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 0.74:\\
\;\;\;\;\ell \cdot \frac{1}{\frac{1}{1 - w}}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if w < 0.73999999999999999Initial program 99.6%
Taylor expanded in w around 0
*-commutativeN/A
distribute-lft-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
Simplified98.8%
Taylor expanded in w around 0
neg-mul-1N/A
unsub-negN/A
--lowering--.f6490.1%
Simplified90.1%
Taylor expanded in w around 0
Simplified73.3%
flip3--N/A
clear-numN/A
/-lowering-/.f64N/A
clear-numN/A
flip3--N/A
/-lowering-/.f64N/A
--lowering--.f6473.3%
Applied egg-rr73.3%
if 0.73999999999999999 < w Initial program 100.0%
exp-negN/A
sqr-powN/A
pow-prod-upN/A
flip-+N/A
+-inversesN/A
metadata-evalN/A
metadata-evalN/A
mul0-lftN/A
*-commutativeN/A
*-commutativeN/A
mul0-lftN/A
metadata-evalN/A
+-inversesN/A
metadata-evalN/A
flip--N/A
metadata-evalN/A
metadata-evalN/A
associate-/r/N/A
div-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
Applied egg-rr97.3%
Final simplification76.8%
(FPCore (w l) :precision binary64 (if (<= w 0.74) (/ l (/ 1.0 (- 1.0 w))) 0.0))
double code(double w, double l) {
double tmp;
if (w <= 0.74) {
tmp = l / (1.0 / (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.74d0) then
tmp = l / (1.0d0 / (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.74) {
tmp = l / (1.0 / (1.0 - w));
} else {
tmp = 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 0.74: tmp = l / (1.0 / (1.0 - w)) else: tmp = 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 0.74) tmp = Float64(l / Float64(1.0 / Float64(1.0 - w))); else tmp = 0.0; end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 0.74) tmp = l / (1.0 / (1.0 - w)); else tmp = 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 0.74], N[(l / N[(1.0 / N[(1.0 - w), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 0.74:\\
\;\;\;\;\frac{\ell}{\frac{1}{1 - w}}\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if w < 0.73999999999999999Initial program 99.6%
Taylor expanded in w around 0
*-commutativeN/A
distribute-lft-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
Simplified98.8%
Taylor expanded in w around 0
neg-mul-1N/A
unsub-negN/A
--lowering--.f6490.1%
Simplified90.1%
Taylor expanded in w around 0
Simplified73.3%
*-commutativeN/A
flip3--N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
clear-numN/A
flip3--N/A
/-lowering-/.f64N/A
--lowering--.f6473.3%
Applied egg-rr73.3%
if 0.73999999999999999 < w Initial program 100.0%
exp-negN/A
sqr-powN/A
pow-prod-upN/A
flip-+N/A
+-inversesN/A
metadata-evalN/A
metadata-evalN/A
mul0-lftN/A
*-commutativeN/A
*-commutativeN/A
mul0-lftN/A
metadata-evalN/A
+-inversesN/A
metadata-evalN/A
flip--N/A
metadata-evalN/A
metadata-evalN/A
associate-/r/N/A
div-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
Applied egg-rr97.3%
(FPCore (w l) :precision binary64 (if (<= w 0.74) (* l (- 1.0 w)) 0.0))
double code(double w, double l) {
double tmp;
if (w <= 0.74) {
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.74d0) 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.74) {
tmp = l * (1.0 - w);
} else {
tmp = 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 0.74: tmp = l * (1.0 - w) else: tmp = 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 0.74) 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.74) tmp = l * (1.0 - w); else tmp = 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 0.74], N[(l * N[(1.0 - w), $MachinePrecision]), $MachinePrecision], 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 0.74:\\
\;\;\;\;\ell \cdot \left(1 - w\right)\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if w < 0.73999999999999999Initial program 99.6%
Taylor expanded in w around 0
*-commutativeN/A
distribute-lft-outN/A
associate-*l*N/A
*-commutativeN/A
distribute-rgt1-inN/A
*-lowering-*.f64N/A
Simplified98.8%
Taylor expanded in w around 0
neg-mul-1N/A
unsub-negN/A
--lowering--.f6490.1%
Simplified90.1%
Taylor expanded in w around 0
Simplified73.3%
if 0.73999999999999999 < w Initial program 100.0%
exp-negN/A
sqr-powN/A
pow-prod-upN/A
flip-+N/A
+-inversesN/A
metadata-evalN/A
metadata-evalN/A
mul0-lftN/A
*-commutativeN/A
*-commutativeN/A
mul0-lftN/A
metadata-evalN/A
+-inversesN/A
metadata-evalN/A
flip--N/A
metadata-evalN/A
metadata-evalN/A
associate-/r/N/A
div-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
Applied egg-rr97.3%
Final simplification76.8%
(FPCore (w l) :precision binary64 (if (<= w 245.0) l 0.0))
double code(double w, double l) {
double tmp;
if (w <= 245.0) {
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 <= 245.0d0) 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 <= 245.0) {
tmp = l;
} else {
tmp = 0.0;
}
return tmp;
}
def code(w, l): tmp = 0 if w <= 245.0: tmp = l else: tmp = 0.0 return tmp
function code(w, l) tmp = 0.0 if (w <= 245.0) tmp = l; else tmp = 0.0; end return tmp end
function tmp_2 = code(w, l) tmp = 0.0; if (w <= 245.0) tmp = l; else tmp = 0.0; end tmp_2 = tmp; end
code[w_, l_] := If[LessEqual[w, 245.0], l, 0.0]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;w \leq 245:\\
\;\;\;\;\ell\\
\mathbf{else}:\\
\;\;\;\;0\\
\end{array}
\end{array}
if w < 245Initial program 99.6%
Taylor expanded in w around 0
Simplified67.5%
if 245 < w Initial program 100.0%
exp-negN/A
sqr-powN/A
pow-prod-upN/A
flip-+N/A
+-inversesN/A
metadata-evalN/A
metadata-evalN/A
mul0-lftN/A
*-commutativeN/A
*-commutativeN/A
mul0-lftN/A
metadata-evalN/A
+-inversesN/A
metadata-evalN/A
flip--N/A
metadata-evalN/A
metadata-evalN/A
associate-/r/N/A
div-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
Applied egg-rr100.0%
(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.7%
exp-negN/A
sqr-powN/A
pow-prod-upN/A
flip-+N/A
+-inversesN/A
metadata-evalN/A
metadata-evalN/A
mul0-lftN/A
*-commutativeN/A
*-commutativeN/A
mul0-lftN/A
metadata-evalN/A
+-inversesN/A
metadata-evalN/A
flip--N/A
metadata-evalN/A
metadata-evalN/A
associate-/r/N/A
div-invN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
metadata-evalN/A
Applied egg-rr16.7%
herbie shell --seed 2024192
(FPCore (w l)
:name "exp-w (used to crash)"
:precision binary64
(* (exp (- w)) (pow l (exp w))))