
(FPCore (F l) :precision binary64 (- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))
double code(double F, double l) {
return (((double) M_PI) * l) - ((1.0 / (F * F)) * tan((((double) M_PI) * l)));
}
public static double code(double F, double l) {
return (Math.PI * l) - ((1.0 / (F * F)) * Math.tan((Math.PI * l)));
}
def code(F, l): return (math.pi * l) - ((1.0 / (F * F)) * math.tan((math.pi * l)))
function code(F, l) return Float64(Float64(pi * l) - Float64(Float64(1.0 / Float64(F * F)) * tan(Float64(pi * l)))) end
function tmp = code(F, l) tmp = (pi * l) - ((1.0 / (F * F)) * tan((pi * l))); end
code[F_, l_] := N[(N[(Pi * l), $MachinePrecision] - N[(N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision] * N[Tan[N[(Pi * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 8 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (F l) :precision binary64 (- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))
double code(double F, double l) {
return (((double) M_PI) * l) - ((1.0 / (F * F)) * tan((((double) M_PI) * l)));
}
public static double code(double F, double l) {
return (Math.PI * l) - ((1.0 / (F * F)) * Math.tan((Math.PI * l)));
}
def code(F, l): return (math.pi * l) - ((1.0 / (F * F)) * math.tan((math.pi * l)))
function code(F, l) return Float64(Float64(pi * l) - Float64(Float64(1.0 / Float64(F * F)) * tan(Float64(pi * l)))) end
function tmp = code(F, l) tmp = (pi * l) - ((1.0 / (F * F)) * tan((pi * l))); end
code[F_, l_] := N[(N[(Pi * l), $MachinePrecision] - N[(N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision] * N[Tan[N[(Pi * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)
\end{array}
(FPCore (F l) :precision binary64 (if (or (<= (* PI l) -2e+24) (not (<= (* PI l) 0.2))) (* PI l) (- (* PI l) (/ (/ (tan (* PI l)) F) F))))
double code(double F, double l) {
double tmp;
if (((((double) M_PI) * l) <= -2e+24) || !((((double) M_PI) * l) <= 0.2)) {
tmp = ((double) M_PI) * l;
} else {
tmp = (((double) M_PI) * l) - ((tan((((double) M_PI) * l)) / F) / F);
}
return tmp;
}
public static double code(double F, double l) {
double tmp;
if (((Math.PI * l) <= -2e+24) || !((Math.PI * l) <= 0.2)) {
tmp = Math.PI * l;
} else {
tmp = (Math.PI * l) - ((Math.tan((Math.PI * l)) / F) / F);
}
return tmp;
}
def code(F, l): tmp = 0 if ((math.pi * l) <= -2e+24) or not ((math.pi * l) <= 0.2): tmp = math.pi * l else: tmp = (math.pi * l) - ((math.tan((math.pi * l)) / F) / F) return tmp
function code(F, l) tmp = 0.0 if ((Float64(pi * l) <= -2e+24) || !(Float64(pi * l) <= 0.2)) tmp = Float64(pi * l); else tmp = Float64(Float64(pi * l) - Float64(Float64(tan(Float64(pi * l)) / F) / F)); end return tmp end
function tmp_2 = code(F, l) tmp = 0.0; if (((pi * l) <= -2e+24) || ~(((pi * l) <= 0.2))) tmp = pi * l; else tmp = (pi * l) - ((tan((pi * l)) / F) / F); end tmp_2 = tmp; end
code[F_, l_] := If[Or[LessEqual[N[(Pi * l), $MachinePrecision], -2e+24], N[Not[LessEqual[N[(Pi * l), $MachinePrecision], 0.2]], $MachinePrecision]], N[(Pi * l), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] - N[(N[(N[Tan[N[(Pi * l), $MachinePrecision]], $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+24} \lor \neg \left(\pi \cdot \ell \leq 0.2\right):\\
\;\;\;\;\pi \cdot \ell\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell - \frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}\\
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < -2e24 or 0.20000000000000001 < (*.f64 (PI.f64) l) Initial program 62.0%
Taylor expanded in l around 0 51.3%
associate-/l*51.3%
associate-/r/51.3%
unpow251.3%
Simplified51.3%
associate-/r*51.3%
associate-*l/51.3%
Applied egg-rr51.3%
Taylor expanded in F around inf 99.7%
if -2e24 < (*.f64 (PI.f64) l) < 0.20000000000000001Initial program 91.9%
associate-*l/92.8%
*-un-lft-identity92.8%
associate-/r*99.6%
Applied egg-rr99.6%
Final simplification99.6%
(FPCore (F l) :precision binary64 (if (or (<= (* PI l) -2e+24) (not (<= (* PI l) 0.2))) (* PI l) (- (* PI l) (* PI (/ l (* F F))))))
double code(double F, double l) {
double tmp;
if (((((double) M_PI) * l) <= -2e+24) || !((((double) M_PI) * l) <= 0.2)) {
tmp = ((double) M_PI) * l;
} else {
tmp = (((double) M_PI) * l) - (((double) M_PI) * (l / (F * F)));
}
return tmp;
}
public static double code(double F, double l) {
double tmp;
if (((Math.PI * l) <= -2e+24) || !((Math.PI * l) <= 0.2)) {
tmp = Math.PI * l;
} else {
tmp = (Math.PI * l) - (Math.PI * (l / (F * F)));
}
return tmp;
}
def code(F, l): tmp = 0 if ((math.pi * l) <= -2e+24) or not ((math.pi * l) <= 0.2): tmp = math.pi * l else: tmp = (math.pi * l) - (math.pi * (l / (F * F))) return tmp
function code(F, l) tmp = 0.0 if ((Float64(pi * l) <= -2e+24) || !(Float64(pi * l) <= 0.2)) tmp = Float64(pi * l); else tmp = Float64(Float64(pi * l) - Float64(pi * Float64(l / Float64(F * F)))); end return tmp end
function tmp_2 = code(F, l) tmp = 0.0; if (((pi * l) <= -2e+24) || ~(((pi * l) <= 0.2))) tmp = pi * l; else tmp = (pi * l) - (pi * (l / (F * F))); end tmp_2 = tmp; end
code[F_, l_] := If[Or[LessEqual[N[(Pi * l), $MachinePrecision], -2e+24], N[Not[LessEqual[N[(Pi * l), $MachinePrecision], 0.2]], $MachinePrecision]], N[(Pi * l), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] - N[(Pi * N[(l / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+24} \lor \neg \left(\pi \cdot \ell \leq 0.2\right):\\
\;\;\;\;\pi \cdot \ell\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell - \pi \cdot \frac{\ell}{F \cdot F}\\
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < -2e24 or 0.20000000000000001 < (*.f64 (PI.f64) l) Initial program 62.0%
Taylor expanded in l around 0 51.3%
associate-/l*51.3%
associate-/r/51.3%
unpow251.3%
Simplified51.3%
associate-/r*51.3%
associate-*l/51.3%
Applied egg-rr51.3%
Taylor expanded in F around inf 99.7%
if -2e24 < (*.f64 (PI.f64) l) < 0.20000000000000001Initial program 91.9%
Taylor expanded in l around 0 92.0%
associate-/l*92.0%
associate-/r/92.0%
unpow292.0%
Simplified92.0%
Final simplification96.0%
(FPCore (F l) :precision binary64 (if (or (<= (* PI l) -2e+24) (not (<= (* PI l) 0.2))) (* PI l) (- (* PI l) (/ l (/ (* F F) PI)))))
double code(double F, double l) {
double tmp;
if (((((double) M_PI) * l) <= -2e+24) || !((((double) M_PI) * l) <= 0.2)) {
tmp = ((double) M_PI) * l;
} else {
tmp = (((double) M_PI) * l) - (l / ((F * F) / ((double) M_PI)));
}
return tmp;
}
public static double code(double F, double l) {
double tmp;
if (((Math.PI * l) <= -2e+24) || !((Math.PI * l) <= 0.2)) {
tmp = Math.PI * l;
} else {
tmp = (Math.PI * l) - (l / ((F * F) / Math.PI));
}
return tmp;
}
def code(F, l): tmp = 0 if ((math.pi * l) <= -2e+24) or not ((math.pi * l) <= 0.2): tmp = math.pi * l else: tmp = (math.pi * l) - (l / ((F * F) / math.pi)) return tmp
function code(F, l) tmp = 0.0 if ((Float64(pi * l) <= -2e+24) || !(Float64(pi * l) <= 0.2)) tmp = Float64(pi * l); else tmp = Float64(Float64(pi * l) - Float64(l / Float64(Float64(F * F) / pi))); end return tmp end
function tmp_2 = code(F, l) tmp = 0.0; if (((pi * l) <= -2e+24) || ~(((pi * l) <= 0.2))) tmp = pi * l; else tmp = (pi * l) - (l / ((F * F) / pi)); end tmp_2 = tmp; end
code[F_, l_] := If[Or[LessEqual[N[(Pi * l), $MachinePrecision], -2e+24], N[Not[LessEqual[N[(Pi * l), $MachinePrecision], 0.2]], $MachinePrecision]], N[(Pi * l), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] - N[(l / N[(N[(F * F), $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+24} \lor \neg \left(\pi \cdot \ell \leq 0.2\right):\\
\;\;\;\;\pi \cdot \ell\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell - \frac{\ell}{\frac{F \cdot F}{\pi}}\\
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < -2e24 or 0.20000000000000001 < (*.f64 (PI.f64) l) Initial program 62.0%
Taylor expanded in l around 0 51.3%
associate-/l*51.3%
associate-/r/51.3%
unpow251.3%
Simplified51.3%
associate-/r*51.3%
associate-*l/51.3%
Applied egg-rr51.3%
Taylor expanded in F around inf 99.7%
if -2e24 < (*.f64 (PI.f64) l) < 0.20000000000000001Initial program 91.9%
Taylor expanded in l around 0 92.0%
associate-/l*92.0%
unpow292.0%
Simplified92.0%
Final simplification96.0%
(FPCore (F l) :precision binary64 (if (or (<= (* PI l) -2e+24) (not (<= (* PI l) 0.2))) (* PI l) (- (* PI l) (/ PI (* F (/ F l))))))
double code(double F, double l) {
double tmp;
if (((((double) M_PI) * l) <= -2e+24) || !((((double) M_PI) * l) <= 0.2)) {
tmp = ((double) M_PI) * l;
} else {
tmp = (((double) M_PI) * l) - (((double) M_PI) / (F * (F / l)));
}
return tmp;
}
public static double code(double F, double l) {
double tmp;
if (((Math.PI * l) <= -2e+24) || !((Math.PI * l) <= 0.2)) {
tmp = Math.PI * l;
} else {
tmp = (Math.PI * l) - (Math.PI / (F * (F / l)));
}
return tmp;
}
def code(F, l): tmp = 0 if ((math.pi * l) <= -2e+24) or not ((math.pi * l) <= 0.2): tmp = math.pi * l else: tmp = (math.pi * l) - (math.pi / (F * (F / l))) return tmp
function code(F, l) tmp = 0.0 if ((Float64(pi * l) <= -2e+24) || !(Float64(pi * l) <= 0.2)) tmp = Float64(pi * l); else tmp = Float64(Float64(pi * l) - Float64(pi / Float64(F * Float64(F / l)))); end return tmp end
function tmp_2 = code(F, l) tmp = 0.0; if (((pi * l) <= -2e+24) || ~(((pi * l) <= 0.2))) tmp = pi * l; else tmp = (pi * l) - (pi / (F * (F / l))); end tmp_2 = tmp; end
code[F_, l_] := If[Or[LessEqual[N[(Pi * l), $MachinePrecision], -2e+24], N[Not[LessEqual[N[(Pi * l), $MachinePrecision], 0.2]], $MachinePrecision]], N[(Pi * l), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] - N[(Pi / N[(F * N[(F / l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+24} \lor \neg \left(\pi \cdot \ell \leq 0.2\right):\\
\;\;\;\;\pi \cdot \ell\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell - \frac{\pi}{F \cdot \frac{F}{\ell}}\\
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < -2e24 or 0.20000000000000001 < (*.f64 (PI.f64) l) Initial program 62.0%
Taylor expanded in l around 0 51.3%
associate-/l*51.3%
associate-/r/51.3%
unpow251.3%
Simplified51.3%
associate-/r*51.3%
associate-*l/51.3%
Applied egg-rr51.3%
Taylor expanded in F around inf 99.7%
if -2e24 < (*.f64 (PI.f64) l) < 0.20000000000000001Initial program 91.9%
associate-*l/92.8%
*-un-lft-identity92.8%
associate-/r*99.6%
Applied egg-rr99.6%
Taylor expanded in l around 0 92.0%
*-commutative92.0%
associate-/l*92.0%
unpow292.0%
associate-*r/98.7%
Simplified98.7%
Final simplification99.2%
(FPCore (F l) :precision binary64 (if (or (<= (* PI l) -2e+24) (not (<= (* PI l) 0.2))) (* PI l) (- (* PI l) (/ (* PI (/ l F)) F))))
double code(double F, double l) {
double tmp;
if (((((double) M_PI) * l) <= -2e+24) || !((((double) M_PI) * l) <= 0.2)) {
tmp = ((double) M_PI) * l;
} else {
tmp = (((double) M_PI) * l) - ((((double) M_PI) * (l / F)) / F);
}
return tmp;
}
public static double code(double F, double l) {
double tmp;
if (((Math.PI * l) <= -2e+24) || !((Math.PI * l) <= 0.2)) {
tmp = Math.PI * l;
} else {
tmp = (Math.PI * l) - ((Math.PI * (l / F)) / F);
}
return tmp;
}
def code(F, l): tmp = 0 if ((math.pi * l) <= -2e+24) or not ((math.pi * l) <= 0.2): tmp = math.pi * l else: tmp = (math.pi * l) - ((math.pi * (l / F)) / F) return tmp
function code(F, l) tmp = 0.0 if ((Float64(pi * l) <= -2e+24) || !(Float64(pi * l) <= 0.2)) tmp = Float64(pi * l); else tmp = Float64(Float64(pi * l) - Float64(Float64(pi * Float64(l / F)) / F)); end return tmp end
function tmp_2 = code(F, l) tmp = 0.0; if (((pi * l) <= -2e+24) || ~(((pi * l) <= 0.2))) tmp = pi * l; else tmp = (pi * l) - ((pi * (l / F)) / F); end tmp_2 = tmp; end
code[F_, l_] := If[Or[LessEqual[N[(Pi * l), $MachinePrecision], -2e+24], N[Not[LessEqual[N[(Pi * l), $MachinePrecision], 0.2]], $MachinePrecision]], N[(Pi * l), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] - N[(N[(Pi * N[(l / F), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+24} \lor \neg \left(\pi \cdot \ell \leq 0.2\right):\\
\;\;\;\;\pi \cdot \ell\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell - \frac{\pi \cdot \frac{\ell}{F}}{F}\\
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < -2e24 or 0.20000000000000001 < (*.f64 (PI.f64) l) Initial program 62.0%
Taylor expanded in l around 0 51.3%
associate-/l*51.3%
associate-/r/51.3%
unpow251.3%
Simplified51.3%
associate-/r*51.3%
associate-*l/51.3%
Applied egg-rr51.3%
Taylor expanded in F around inf 99.7%
if -2e24 < (*.f64 (PI.f64) l) < 0.20000000000000001Initial program 91.9%
Taylor expanded in l around 0 92.0%
associate-/l*92.0%
associate-/r/92.0%
unpow292.0%
Simplified92.0%
associate-/r*98.7%
associate-*l/98.7%
Applied egg-rr98.7%
Final simplification99.2%
(FPCore (F l) :precision binary64 (if (or (<= (* PI l) -2e+24) (not (<= (* PI l) 0.2))) (* PI l) (- (* PI l) (/ (/ (* PI l) F) F))))
double code(double F, double l) {
double tmp;
if (((((double) M_PI) * l) <= -2e+24) || !((((double) M_PI) * l) <= 0.2)) {
tmp = ((double) M_PI) * l;
} else {
tmp = (((double) M_PI) * l) - (((((double) M_PI) * l) / F) / F);
}
return tmp;
}
public static double code(double F, double l) {
double tmp;
if (((Math.PI * l) <= -2e+24) || !((Math.PI * l) <= 0.2)) {
tmp = Math.PI * l;
} else {
tmp = (Math.PI * l) - (((Math.PI * l) / F) / F);
}
return tmp;
}
def code(F, l): tmp = 0 if ((math.pi * l) <= -2e+24) or not ((math.pi * l) <= 0.2): tmp = math.pi * l else: tmp = (math.pi * l) - (((math.pi * l) / F) / F) return tmp
function code(F, l) tmp = 0.0 if ((Float64(pi * l) <= -2e+24) || !(Float64(pi * l) <= 0.2)) tmp = Float64(pi * l); else tmp = Float64(Float64(pi * l) - Float64(Float64(Float64(pi * l) / F) / F)); end return tmp end
function tmp_2 = code(F, l) tmp = 0.0; if (((pi * l) <= -2e+24) || ~(((pi * l) <= 0.2))) tmp = pi * l; else tmp = (pi * l) - (((pi * l) / F) / F); end tmp_2 = tmp; end
code[F_, l_] := If[Or[LessEqual[N[(Pi * l), $MachinePrecision], -2e+24], N[Not[LessEqual[N[(Pi * l), $MachinePrecision], 0.2]], $MachinePrecision]], N[(Pi * l), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] - N[(N[(N[(Pi * l), $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+24} \lor \neg \left(\pi \cdot \ell \leq 0.2\right):\\
\;\;\;\;\pi \cdot \ell\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell - \frac{\frac{\pi \cdot \ell}{F}}{F}\\
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < -2e24 or 0.20000000000000001 < (*.f64 (PI.f64) l) Initial program 62.0%
Taylor expanded in l around 0 51.3%
associate-/l*51.3%
associate-/r/51.3%
unpow251.3%
Simplified51.3%
associate-/r*51.3%
associate-*l/51.3%
Applied egg-rr51.3%
Taylor expanded in F around inf 99.7%
if -2e24 < (*.f64 (PI.f64) l) < 0.20000000000000001Initial program 91.9%
Taylor expanded in l around 0 92.0%
associate-/l*92.0%
associate-/r/92.0%
unpow292.0%
Simplified92.0%
associate-*l/92.0%
*-commutative92.0%
associate-/r*98.8%
Applied egg-rr98.8%
Final simplification99.2%
(FPCore (F l) :precision binary64 (if (or (<= (* PI l) -2e+24) (not (<= (* PI l) 0.2))) (* PI l) (* PI (- l (/ l (* F F))))))
double code(double F, double l) {
double tmp;
if (((((double) M_PI) * l) <= -2e+24) || !((((double) M_PI) * l) <= 0.2)) {
tmp = ((double) M_PI) * l;
} else {
tmp = ((double) M_PI) * (l - (l / (F * F)));
}
return tmp;
}
public static double code(double F, double l) {
double tmp;
if (((Math.PI * l) <= -2e+24) || !((Math.PI * l) <= 0.2)) {
tmp = Math.PI * l;
} else {
tmp = Math.PI * (l - (l / (F * F)));
}
return tmp;
}
def code(F, l): tmp = 0 if ((math.pi * l) <= -2e+24) or not ((math.pi * l) <= 0.2): tmp = math.pi * l else: tmp = math.pi * (l - (l / (F * F))) return tmp
function code(F, l) tmp = 0.0 if ((Float64(pi * l) <= -2e+24) || !(Float64(pi * l) <= 0.2)) tmp = Float64(pi * l); else tmp = Float64(pi * Float64(l - Float64(l / Float64(F * F)))); end return tmp end
function tmp_2 = code(F, l) tmp = 0.0; if (((pi * l) <= -2e+24) || ~(((pi * l) <= 0.2))) tmp = pi * l; else tmp = pi * (l - (l / (F * F))); end tmp_2 = tmp; end
code[F_, l_] := If[Or[LessEqual[N[(Pi * l), $MachinePrecision], -2e+24], N[Not[LessEqual[N[(Pi * l), $MachinePrecision], 0.2]], $MachinePrecision]], N[(Pi * l), $MachinePrecision], N[(Pi * N[(l - N[(l / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+24} \lor \neg \left(\pi \cdot \ell \leq 0.2\right):\\
\;\;\;\;\pi \cdot \ell\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot \left(\ell - \frac{\ell}{F \cdot F}\right)\\
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < -2e24 or 0.20000000000000001 < (*.f64 (PI.f64) l) Initial program 62.0%
Taylor expanded in l around 0 51.3%
associate-/l*51.3%
associate-/r/51.3%
unpow251.3%
Simplified51.3%
associate-/r*51.3%
associate-*l/51.3%
Applied egg-rr51.3%
Taylor expanded in F around inf 99.7%
if -2e24 < (*.f64 (PI.f64) l) < 0.20000000000000001Initial program 91.9%
Taylor expanded in l around 0 92.0%
associate-/l*92.0%
associate-/r/92.0%
unpow292.0%
Simplified92.0%
associate-/r*98.7%
associate-*l/98.7%
Applied egg-rr98.7%
Taylor expanded in l around 0 91.2%
sub-neg91.2%
mul-1-neg91.2%
distribute-rgt-in91.2%
associate-*r/91.2%
unpow291.2%
times-frac91.2%
metadata-eval91.2%
distribute-neg-frac91.2%
associate-*r*98.7%
associate-*l/98.7%
associate-*r/98.7%
cancel-sign-sub-inv98.7%
*-commutative98.7%
associate-*r*98.7%
distribute-lft-out--98.7%
associate-*r/98.7%
Simplified92.0%
Final simplification96.0%
(FPCore (F l) :precision binary64 (* PI l))
double code(double F, double l) {
return ((double) M_PI) * l;
}
public static double code(double F, double l) {
return Math.PI * l;
}
def code(F, l): return math.pi * l
function code(F, l) return Float64(pi * l) end
function tmp = code(F, l) tmp = pi * l; end
code[F_, l_] := N[(Pi * l), $MachinePrecision]
\begin{array}{l}
\\
\pi \cdot \ell
\end{array}
Initial program 76.3%
Taylor expanded in l around 0 70.7%
associate-/l*70.7%
associate-/r/70.7%
unpow270.7%
Simplified70.7%
associate-/r*73.9%
associate-*l/73.9%
Applied egg-rr73.9%
Taylor expanded in F around inf 80.2%
Final simplification80.2%
herbie shell --seed 2023287
(FPCore (F l)
:name "VandenBroeck and Keller, Equation (6)"
:precision binary64
(- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))