
(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 12 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}
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
:precision binary64
(let* ((t_0 (sin (* PI l_m))))
(*
l_s
(if (<= (* PI l_m) 2000000000000.0)
(+ (* PI l_m) (/ (* t_0 (/ -1.0 F)) (* F (cos (* PI l_m)))))
(+
(* PI l_m)
(/
(* (/ 1.0 F) t_0)
(* F (fma -0.5 (pow (log1p (expm1 (* PI l_m))) 2.0) 1.0))))))))l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
double t_0 = sin((((double) M_PI) * l_m));
double tmp;
if ((((double) M_PI) * l_m) <= 2000000000000.0) {
tmp = (((double) M_PI) * l_m) + ((t_0 * (-1.0 / F)) / (F * cos((((double) M_PI) * l_m))));
} else {
tmp = (((double) M_PI) * l_m) + (((1.0 / F) * t_0) / (F * fma(-0.5, pow(log1p(expm1((((double) M_PI) * l_m))), 2.0), 1.0)));
}
return l_s * tmp;
}
l\_m = abs(l) l\_s = copysign(1.0, l) function code(l_s, F, l_m) t_0 = sin(Float64(pi * l_m)) tmp = 0.0 if (Float64(pi * l_m) <= 2000000000000.0) tmp = Float64(Float64(pi * l_m) + Float64(Float64(t_0 * Float64(-1.0 / F)) / Float64(F * cos(Float64(pi * l_m))))); else tmp = Float64(Float64(pi * l_m) + Float64(Float64(Float64(1.0 / F) * t_0) / Float64(F * fma(-0.5, (log1p(expm1(Float64(pi * l_m))) ^ 2.0), 1.0)))); end return Float64(l_s * tmp) end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := Block[{t$95$0 = N[Sin[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision]}, N[(l$95$s * If[LessEqual[N[(Pi * l$95$m), $MachinePrecision], 2000000000000.0], N[(N[(Pi * l$95$m), $MachinePrecision] + N[(N[(t$95$0 * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] / N[(F * N[Cos[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * l$95$m), $MachinePrecision] + N[(N[(N[(1.0 / F), $MachinePrecision] * t$95$0), $MachinePrecision] / N[(F * N[(-0.5 * N[Power[N[Log[1 + N[(Exp[N[(Pi * l$95$m), $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
\begin{array}{l}
t_0 := \sin \left(\pi \cdot l\_m\right)\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;\pi \cdot l\_m \leq 2000000000000:\\
\;\;\;\;\pi \cdot l\_m + \frac{t\_0 \cdot \frac{-1}{F}}{F \cdot \cos \left(\pi \cdot l\_m\right)}\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot l\_m + \frac{\frac{1}{F} \cdot t\_0}{F \cdot \mathsf{fma}\left(-0.5, {\left(\mathsf{log1p}\left(\mathsf{expm1}\left(\pi \cdot l\_m\right)\right)\right)}^{2}, 1\right)}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 2e12Initial program 74.9%
associate-/r*74.9%
metadata-eval74.9%
add-sqr-sqrt41.3%
sqrt-prod66.8%
sqrt-div66.8%
tan-quot66.8%
frac-times66.8%
sqrt-div66.8%
metadata-eval66.8%
sqrt-prod46.3%
add-sqr-sqrt84.9%
Applied egg-rr84.9%
if 2e12 < (*.f64 (PI.f64) l) Initial program 58.2%
associate-/r*58.2%
metadata-eval58.2%
add-sqr-sqrt27.5%
sqrt-prod57.9%
sqrt-div57.9%
tan-quot57.9%
frac-times57.9%
sqrt-div57.9%
metadata-eval57.9%
sqrt-prod27.5%
add-sqr-sqrt58.2%
Applied egg-rr58.2%
add-sqr-sqrt26.4%
sqrt-unprod58.2%
sqr-neg58.2%
*-commutative58.2%
*-commutative58.2%
sqrt-unprod31.9%
add-sqr-sqrt58.4%
*-commutative58.4%
Applied egg-rr58.4%
Taylor expanded in l around 0 85.9%
+-commutative85.9%
fma-define85.9%
*-commutative85.9%
unpow285.9%
unpow285.9%
swap-sqr85.9%
unpow285.9%
*-commutative85.9%
Simplified85.9%
*-commutative85.9%
log1p-expm1-u99.5%
Applied egg-rr99.5%
Final simplification88.9%
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
:precision binary64
(let* ((t_0 (sin (* PI l_m))))
(*
l_s
(if (<= (* PI l_m) 1e+18)
(+ (* PI l_m) (/ (* t_0 (/ -1.0 F)) (* F (cos (* PI l_m)))))
(-
(* PI l_m)
(/
(/ t_0 F)
(* F (* (* (pow PI 6.0) (pow l_m 6.0)) -0.001388888888888889))))))))l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
double t_0 = sin((((double) M_PI) * l_m));
double tmp;
if ((((double) M_PI) * l_m) <= 1e+18) {
tmp = (((double) M_PI) * l_m) + ((t_0 * (-1.0 / F)) / (F * cos((((double) M_PI) * l_m))));
} else {
tmp = (((double) M_PI) * l_m) - ((t_0 / F) / (F * ((pow(((double) M_PI), 6.0) * pow(l_m, 6.0)) * -0.001388888888888889)));
}
return l_s * tmp;
}
l\_m = Math.abs(l);
l\_s = Math.copySign(1.0, l);
public static double code(double l_s, double F, double l_m) {
double t_0 = Math.sin((Math.PI * l_m));
double tmp;
if ((Math.PI * l_m) <= 1e+18) {
tmp = (Math.PI * l_m) + ((t_0 * (-1.0 / F)) / (F * Math.cos((Math.PI * l_m))));
} else {
tmp = (Math.PI * l_m) - ((t_0 / F) / (F * ((Math.pow(Math.PI, 6.0) * Math.pow(l_m, 6.0)) * -0.001388888888888889)));
}
return l_s * tmp;
}
l\_m = math.fabs(l) l\_s = math.copysign(1.0, l) def code(l_s, F, l_m): t_0 = math.sin((math.pi * l_m)) tmp = 0 if (math.pi * l_m) <= 1e+18: tmp = (math.pi * l_m) + ((t_0 * (-1.0 / F)) / (F * math.cos((math.pi * l_m)))) else: tmp = (math.pi * l_m) - ((t_0 / F) / (F * ((math.pow(math.pi, 6.0) * math.pow(l_m, 6.0)) * -0.001388888888888889))) return l_s * tmp
l\_m = abs(l) l\_s = copysign(1.0, l) function code(l_s, F, l_m) t_0 = sin(Float64(pi * l_m)) tmp = 0.0 if (Float64(pi * l_m) <= 1e+18) tmp = Float64(Float64(pi * l_m) + Float64(Float64(t_0 * Float64(-1.0 / F)) / Float64(F * cos(Float64(pi * l_m))))); else tmp = Float64(Float64(pi * l_m) - Float64(Float64(t_0 / F) / Float64(F * Float64(Float64((pi ^ 6.0) * (l_m ^ 6.0)) * -0.001388888888888889)))); end return Float64(l_s * tmp) end
l\_m = abs(l); l\_s = sign(l) * abs(1.0); function tmp_2 = code(l_s, F, l_m) t_0 = sin((pi * l_m)); tmp = 0.0; if ((pi * l_m) <= 1e+18) tmp = (pi * l_m) + ((t_0 * (-1.0 / F)) / (F * cos((pi * l_m)))); else tmp = (pi * l_m) - ((t_0 / F) / (F * (((pi ^ 6.0) * (l_m ^ 6.0)) * -0.001388888888888889))); end tmp_2 = l_s * tmp; end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := Block[{t$95$0 = N[Sin[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision]}, N[(l$95$s * If[LessEqual[N[(Pi * l$95$m), $MachinePrecision], 1e+18], N[(N[(Pi * l$95$m), $MachinePrecision] + N[(N[(t$95$0 * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] / N[(F * N[Cos[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * l$95$m), $MachinePrecision] - N[(N[(t$95$0 / F), $MachinePrecision] / N[(F * N[(N[(N[Power[Pi, 6.0], $MachinePrecision] * N[Power[l$95$m, 6.0], $MachinePrecision]), $MachinePrecision] * -0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
\begin{array}{l}
t_0 := \sin \left(\pi \cdot l\_m\right)\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;\pi \cdot l\_m \leq 10^{+18}:\\
\;\;\;\;\pi \cdot l\_m + \frac{t\_0 \cdot \frac{-1}{F}}{F \cdot \cos \left(\pi \cdot l\_m\right)}\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot l\_m - \frac{\frac{t\_0}{F}}{F \cdot \left(\left({\pi}^{6} \cdot {l\_m}^{6}\right) \cdot -0.001388888888888889\right)}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 1e18Initial program 74.9%
associate-/r*74.9%
metadata-eval74.9%
add-sqr-sqrt41.3%
sqrt-prod66.8%
sqrt-div66.8%
tan-quot66.8%
frac-times66.8%
sqrt-div66.8%
metadata-eval66.8%
sqrt-prod46.3%
add-sqr-sqrt84.9%
Applied egg-rr84.9%
if 1e18 < (*.f64 (PI.f64) l) Initial program 58.2%
associate-/r*58.2%
metadata-eval58.2%
add-sqr-sqrt27.5%
sqrt-prod57.9%
sqrt-div57.9%
tan-quot57.9%
frac-times57.9%
sqrt-div57.9%
metadata-eval57.9%
sqrt-prod27.5%
add-sqr-sqrt58.2%
Applied egg-rr58.2%
Taylor expanded in l around 0 96.8%
associate-*l/96.8%
*-un-lft-identity96.8%
Applied egg-rr96.8%
Taylor expanded in l around inf 96.8%
*-commutative96.8%
associate-*l*96.8%
*-commutative96.8%
Simplified96.8%
Final simplification88.1%
l\_m = (fabs.f64 l) l\_s = (copysign.f64 #s(literal 1 binary64) l) (FPCore (l_s F l_m) :precision binary64 (* l_s (- (* PI l_m) (/ (/ (sin (* PI l_m)) F) (* F (fma -0.5 (pow (* PI l_m) 2.0) 1.0))))))
l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
return l_s * ((((double) M_PI) * l_m) - ((sin((((double) M_PI) * l_m)) / F) / (F * fma(-0.5, pow((((double) M_PI) * l_m), 2.0), 1.0))));
}
l\_m = abs(l) l\_s = copysign(1.0, l) function code(l_s, F, l_m) return Float64(l_s * Float64(Float64(pi * l_m) - Float64(Float64(sin(Float64(pi * l_m)) / F) / Float64(F * fma(-0.5, (Float64(pi * l_m) ^ 2.0), 1.0))))) end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := N[(l$95$s * N[(N[(Pi * l$95$m), $MachinePrecision] - N[(N[(N[Sin[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision] / F), $MachinePrecision] / N[(F * N[(-0.5 * N[Power[N[(Pi * l$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
l\_s \cdot \left(\pi \cdot l\_m - \frac{\frac{\sin \left(\pi \cdot l\_m\right)}{F}}{F \cdot \mathsf{fma}\left(-0.5, {\left(\pi \cdot l\_m\right)}^{2}, 1\right)}\right)
\end{array}
Initial program 70.3%
associate-/r*70.3%
metadata-eval70.3%
add-sqr-sqrt37.5%
sqrt-prod64.4%
sqrt-div64.4%
tan-quot64.4%
frac-times64.4%
sqrt-div64.4%
metadata-eval64.4%
sqrt-prod41.2%
add-sqr-sqrt77.6%
Applied egg-rr77.6%
Taylor expanded in l around 0 97.0%
associate-*l/97.0%
*-un-lft-identity97.0%
Applied egg-rr97.0%
Taylor expanded in l around 0 91.1%
+-commutative91.1%
*-commutative91.1%
unpow291.1%
unpow291.1%
swap-sqr91.1%
unpow291.1%
associate-*r*91.1%
*-lft-identity91.1%
distribute-rgt-in91.1%
fma-undefine91.1%
Simplified91.1%
Final simplification91.1%
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
:precision binary64
(let* ((t_0 (* (sin (* PI l_m)) (/ -1.0 F))))
(*
l_s
(if (<= (* PI l_m) 2000000000000.0)
(+ (* PI l_m) (/ t_0 (* F (cos (* PI l_m)))))
(+ (* PI l_m) (/ t_0 (* F (* (pow (* PI l_m) 2.0) 0.5))))))))l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
double t_0 = sin((((double) M_PI) * l_m)) * (-1.0 / F);
double tmp;
if ((((double) M_PI) * l_m) <= 2000000000000.0) {
tmp = (((double) M_PI) * l_m) + (t_0 / (F * cos((((double) M_PI) * l_m))));
} else {
tmp = (((double) M_PI) * l_m) + (t_0 / (F * (pow((((double) M_PI) * l_m), 2.0) * 0.5)));
}
return l_s * tmp;
}
l\_m = Math.abs(l);
l\_s = Math.copySign(1.0, l);
public static double code(double l_s, double F, double l_m) {
double t_0 = Math.sin((Math.PI * l_m)) * (-1.0 / F);
double tmp;
if ((Math.PI * l_m) <= 2000000000000.0) {
tmp = (Math.PI * l_m) + (t_0 / (F * Math.cos((Math.PI * l_m))));
} else {
tmp = (Math.PI * l_m) + (t_0 / (F * (Math.pow((Math.PI * l_m), 2.0) * 0.5)));
}
return l_s * tmp;
}
l\_m = math.fabs(l) l\_s = math.copysign(1.0, l) def code(l_s, F, l_m): t_0 = math.sin((math.pi * l_m)) * (-1.0 / F) tmp = 0 if (math.pi * l_m) <= 2000000000000.0: tmp = (math.pi * l_m) + (t_0 / (F * math.cos((math.pi * l_m)))) else: tmp = (math.pi * l_m) + (t_0 / (F * (math.pow((math.pi * l_m), 2.0) * 0.5))) return l_s * tmp
l\_m = abs(l) l\_s = copysign(1.0, l) function code(l_s, F, l_m) t_0 = Float64(sin(Float64(pi * l_m)) * Float64(-1.0 / F)) tmp = 0.0 if (Float64(pi * l_m) <= 2000000000000.0) tmp = Float64(Float64(pi * l_m) + Float64(t_0 / Float64(F * cos(Float64(pi * l_m))))); else tmp = Float64(Float64(pi * l_m) + Float64(t_0 / Float64(F * Float64((Float64(pi * l_m) ^ 2.0) * 0.5)))); end return Float64(l_s * tmp) end
l\_m = abs(l); l\_s = sign(l) * abs(1.0); function tmp_2 = code(l_s, F, l_m) t_0 = sin((pi * l_m)) * (-1.0 / F); tmp = 0.0; if ((pi * l_m) <= 2000000000000.0) tmp = (pi * l_m) + (t_0 / (F * cos((pi * l_m)))); else tmp = (pi * l_m) + (t_0 / (F * (((pi * l_m) ^ 2.0) * 0.5))); end tmp_2 = l_s * tmp; end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := Block[{t$95$0 = N[(N[Sin[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision]}, N[(l$95$s * If[LessEqual[N[(Pi * l$95$m), $MachinePrecision], 2000000000000.0], N[(N[(Pi * l$95$m), $MachinePrecision] + N[(t$95$0 / N[(F * N[Cos[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * l$95$m), $MachinePrecision] + N[(t$95$0 / N[(F * N[(N[Power[N[(Pi * l$95$m), $MachinePrecision], 2.0], $MachinePrecision] * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
\begin{array}{l}
t_0 := \sin \left(\pi \cdot l\_m\right) \cdot \frac{-1}{F}\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;\pi \cdot l\_m \leq 2000000000000:\\
\;\;\;\;\pi \cdot l\_m + \frac{t\_0}{F \cdot \cos \left(\pi \cdot l\_m\right)}\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot l\_m + \frac{t\_0}{F \cdot \left({\left(\pi \cdot l\_m\right)}^{2} \cdot 0.5\right)}\\
\end{array}
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 2e12Initial program 74.9%
associate-/r*74.9%
metadata-eval74.9%
add-sqr-sqrt41.3%
sqrt-prod66.8%
sqrt-div66.8%
tan-quot66.8%
frac-times66.8%
sqrt-div66.8%
metadata-eval66.8%
sqrt-prod46.3%
add-sqr-sqrt84.9%
Applied egg-rr84.9%
if 2e12 < (*.f64 (PI.f64) l) Initial program 58.2%
associate-/r*58.2%
metadata-eval58.2%
add-sqr-sqrt27.5%
sqrt-prod57.9%
sqrt-div57.9%
tan-quot57.9%
frac-times57.9%
sqrt-div57.9%
metadata-eval57.9%
sqrt-prod27.5%
add-sqr-sqrt58.2%
Applied egg-rr58.2%
add-sqr-sqrt26.4%
sqrt-unprod58.2%
sqr-neg58.2%
*-commutative58.2%
*-commutative58.2%
sqrt-unprod31.9%
add-sqr-sqrt58.4%
*-commutative58.4%
Applied egg-rr58.4%
Taylor expanded in l around 0 85.9%
+-commutative85.9%
fma-define85.9%
*-commutative85.9%
unpow285.9%
unpow285.9%
swap-sqr85.9%
unpow285.9%
*-commutative85.9%
Simplified85.9%
Taylor expanded in l around inf 85.9%
*-commutative85.9%
unpow285.9%
unpow285.9%
swap-sqr85.9%
unpow285.9%
associate-*l*85.9%
unpow285.9%
swap-sqr85.9%
unpow285.9%
unpow285.9%
*-commutative85.9%
unpow285.9%
unpow285.9%
swap-sqr85.9%
unpow285.9%
Simplified85.9%
Final simplification85.2%
l\_m = (fabs.f64 l) l\_s = (copysign.f64 #s(literal 1 binary64) l) (FPCore (l_s F l_m) :precision binary64 (* l_s (+ (* PI l_m) (/ (* (sin (* PI l_m)) (/ -1.0 F)) (* F (cos (* PI l_m)))))))
l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
return l_s * ((((double) M_PI) * l_m) + ((sin((((double) M_PI) * l_m)) * (-1.0 / F)) / (F * cos((((double) M_PI) * l_m)))));
}
l\_m = Math.abs(l);
l\_s = Math.copySign(1.0, l);
public static double code(double l_s, double F, double l_m) {
return l_s * ((Math.PI * l_m) + ((Math.sin((Math.PI * l_m)) * (-1.0 / F)) / (F * Math.cos((Math.PI * l_m)))));
}
l\_m = math.fabs(l) l\_s = math.copysign(1.0, l) def code(l_s, F, l_m): return l_s * ((math.pi * l_m) + ((math.sin((math.pi * l_m)) * (-1.0 / F)) / (F * math.cos((math.pi * l_m)))))
l\_m = abs(l) l\_s = copysign(1.0, l) function code(l_s, F, l_m) return Float64(l_s * Float64(Float64(pi * l_m) + Float64(Float64(sin(Float64(pi * l_m)) * Float64(-1.0 / F)) / Float64(F * cos(Float64(pi * l_m)))))) end
l\_m = abs(l); l\_s = sign(l) * abs(1.0); function tmp = code(l_s, F, l_m) tmp = l_s * ((pi * l_m) + ((sin((pi * l_m)) * (-1.0 / F)) / (F * cos((pi * l_m))))); end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := N[(l$95$s * N[(N[(Pi * l$95$m), $MachinePrecision] + N[(N[(N[Sin[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] / N[(F * N[Cos[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
l\_s \cdot \left(\pi \cdot l\_m + \frac{\sin \left(\pi \cdot l\_m\right) \cdot \frac{-1}{F}}{F \cdot \cos \left(\pi \cdot l\_m\right)}\right)
\end{array}
Initial program 70.3%
associate-/r*70.3%
metadata-eval70.3%
add-sqr-sqrt37.5%
sqrt-prod64.4%
sqrt-div64.4%
tan-quot64.4%
frac-times64.4%
sqrt-div64.4%
metadata-eval64.4%
sqrt-prod41.2%
add-sqr-sqrt77.6%
Applied egg-rr77.6%
Final simplification77.6%
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
:precision binary64
(*
l_s
(if (<= (* PI l_m) 2e-71)
(- (* PI l_m) (/ (* l_m (/ PI F)) F))
(- (* PI l_m) (/ (tan (* PI l_m)) (* F F))))))l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
double tmp;
if ((((double) M_PI) * l_m) <= 2e-71) {
tmp = (((double) M_PI) * l_m) - ((l_m * (((double) M_PI) / F)) / F);
} else {
tmp = (((double) M_PI) * l_m) - (tan((((double) M_PI) * l_m)) / (F * F));
}
return l_s * tmp;
}
l\_m = Math.abs(l);
l\_s = Math.copySign(1.0, l);
public static double code(double l_s, double F, double l_m) {
double tmp;
if ((Math.PI * l_m) <= 2e-71) {
tmp = (Math.PI * l_m) - ((l_m * (Math.PI / F)) / F);
} else {
tmp = (Math.PI * l_m) - (Math.tan((Math.PI * l_m)) / (F * F));
}
return l_s * tmp;
}
l\_m = math.fabs(l) l\_s = math.copysign(1.0, l) def code(l_s, F, l_m): tmp = 0 if (math.pi * l_m) <= 2e-71: tmp = (math.pi * l_m) - ((l_m * (math.pi / F)) / F) else: tmp = (math.pi * l_m) - (math.tan((math.pi * l_m)) / (F * F)) return l_s * tmp
l\_m = abs(l) l\_s = copysign(1.0, l) function code(l_s, F, l_m) tmp = 0.0 if (Float64(pi * l_m) <= 2e-71) tmp = Float64(Float64(pi * l_m) - Float64(Float64(l_m * Float64(pi / F)) / F)); else tmp = Float64(Float64(pi * l_m) - Float64(tan(Float64(pi * l_m)) / Float64(F * F))); end return Float64(l_s * tmp) end
l\_m = abs(l); l\_s = sign(l) * abs(1.0); function tmp_2 = code(l_s, F, l_m) tmp = 0.0; if ((pi * l_m) <= 2e-71) tmp = (pi * l_m) - ((l_m * (pi / F)) / F); else tmp = (pi * l_m) - (tan((pi * l_m)) / (F * F)); end tmp_2 = l_s * tmp; end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := N[(l$95$s * If[LessEqual[N[(Pi * l$95$m), $MachinePrecision], 2e-71], N[(N[(Pi * l$95$m), $MachinePrecision] - N[(N[(l$95$m * N[(Pi / F), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * l$95$m), $MachinePrecision] - N[(N[Tan[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;\pi \cdot l\_m \leq 2 \cdot 10^{-71}:\\
\;\;\;\;\pi \cdot l\_m - \frac{l\_m \cdot \frac{\pi}{F}}{F}\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot l\_m - \frac{\tan \left(\pi \cdot l\_m\right)}{F \cdot F}\\
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 1.9999999999999998e-71Initial program 73.2%
*-commutative73.2%
sqr-neg73.2%
associate-*r/73.2%
*-rgt-identity73.2%
sqr-neg73.2%
Simplified73.2%
Taylor expanded in l around 0 67.2%
*-commutative67.2%
times-frac77.8%
Applied egg-rr77.8%
associate-*r/77.8%
Applied egg-rr77.8%
if 1.9999999999999998e-71 < (*.f64 (PI.f64) l) Initial program 64.2%
*-commutative64.2%
sqr-neg64.2%
associate-*r/64.2%
*-rgt-identity64.2%
sqr-neg64.2%
Simplified64.2%
Final simplification73.4%
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
:precision binary64
(*
l_s
(if (<= (* PI l_m) 2000000000000.0)
(- (* PI l_m) (/ (* l_m (/ PI F)) F))
(- (* PI l_m) (/ (sin (* PI l_m)) (* F F))))))l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
double tmp;
if ((((double) M_PI) * l_m) <= 2000000000000.0) {
tmp = (((double) M_PI) * l_m) - ((l_m * (((double) M_PI) / F)) / F);
} else {
tmp = (((double) M_PI) * l_m) - (sin((((double) M_PI) * l_m)) / (F * F));
}
return l_s * tmp;
}
l\_m = Math.abs(l);
l\_s = Math.copySign(1.0, l);
public static double code(double l_s, double F, double l_m) {
double tmp;
if ((Math.PI * l_m) <= 2000000000000.0) {
tmp = (Math.PI * l_m) - ((l_m * (Math.PI / F)) / F);
} else {
tmp = (Math.PI * l_m) - (Math.sin((Math.PI * l_m)) / (F * F));
}
return l_s * tmp;
}
l\_m = math.fabs(l) l\_s = math.copysign(1.0, l) def code(l_s, F, l_m): tmp = 0 if (math.pi * l_m) <= 2000000000000.0: tmp = (math.pi * l_m) - ((l_m * (math.pi / F)) / F) else: tmp = (math.pi * l_m) - (math.sin((math.pi * l_m)) / (F * F)) return l_s * tmp
l\_m = abs(l) l\_s = copysign(1.0, l) function code(l_s, F, l_m) tmp = 0.0 if (Float64(pi * l_m) <= 2000000000000.0) tmp = Float64(Float64(pi * l_m) - Float64(Float64(l_m * Float64(pi / F)) / F)); else tmp = Float64(Float64(pi * l_m) - Float64(sin(Float64(pi * l_m)) / Float64(F * F))); end return Float64(l_s * tmp) end
l\_m = abs(l); l\_s = sign(l) * abs(1.0); function tmp_2 = code(l_s, F, l_m) tmp = 0.0; if ((pi * l_m) <= 2000000000000.0) tmp = (pi * l_m) - ((l_m * (pi / F)) / F); else tmp = (pi * l_m) - (sin((pi * l_m)) / (F * F)); end tmp_2 = l_s * tmp; end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := N[(l$95$s * If[LessEqual[N[(Pi * l$95$m), $MachinePrecision], 2000000000000.0], N[(N[(Pi * l$95$m), $MachinePrecision] - N[(N[(l$95$m * N[(Pi / F), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * l$95$m), $MachinePrecision] - N[(N[Sin[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;\pi \cdot l\_m \leq 2000000000000:\\
\;\;\;\;\pi \cdot l\_m - \frac{l\_m \cdot \frac{\pi}{F}}{F}\\
\mathbf{else}:\\
\;\;\;\;\pi \cdot l\_m - \frac{\sin \left(\pi \cdot l\_m\right)}{F \cdot F}\\
\end{array}
\end{array}
if (*.f64 (PI.f64) l) < 2e12Initial program 74.9%
*-commutative74.9%
sqr-neg74.9%
associate-*r/74.9%
*-rgt-identity74.9%
sqr-neg74.9%
Simplified74.9%
Taylor expanded in l around 0 68.9%
*-commutative68.9%
times-frac78.8%
Applied egg-rr78.8%
associate-*r/78.8%
Applied egg-rr78.8%
if 2e12 < (*.f64 (PI.f64) l) Initial program 58.2%
*-commutative58.2%
sqr-neg58.2%
associate-*r/58.2%
*-rgt-identity58.2%
sqr-neg58.2%
Simplified58.2%
tan-quot58.2%
Applied egg-rr58.2%
Taylor expanded in l around 0 58.2%
/-rgt-identity58.2%
Applied egg-rr58.2%
Final simplification73.2%
l\_m = (fabs.f64 l) l\_s = (copysign.f64 #s(literal 1 binary64) l) (FPCore (l_s F l_m) :precision binary64 (* l_s (+ (* PI l_m) (/ (* (tan (* PI l_m)) (/ -1.0 F)) F))))
l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
return l_s * ((((double) M_PI) * l_m) + ((tan((((double) M_PI) * l_m)) * (-1.0 / F)) / F));
}
l\_m = Math.abs(l);
l\_s = Math.copySign(1.0, l);
public static double code(double l_s, double F, double l_m) {
return l_s * ((Math.PI * l_m) + ((Math.tan((Math.PI * l_m)) * (-1.0 / F)) / F));
}
l\_m = math.fabs(l) l\_s = math.copysign(1.0, l) def code(l_s, F, l_m): return l_s * ((math.pi * l_m) + ((math.tan((math.pi * l_m)) * (-1.0 / F)) / F))
l\_m = abs(l) l\_s = copysign(1.0, l) function code(l_s, F, l_m) return Float64(l_s * Float64(Float64(pi * l_m) + Float64(Float64(tan(Float64(pi * l_m)) * Float64(-1.0 / F)) / F))) end
l\_m = abs(l); l\_s = sign(l) * abs(1.0); function tmp = code(l_s, F, l_m) tmp = l_s * ((pi * l_m) + ((tan((pi * l_m)) * (-1.0 / F)) / F)); end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := N[(l$95$s * N[(N[(Pi * l$95$m), $MachinePrecision] + N[(N[(N[Tan[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / F), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
l\_s \cdot \left(\pi \cdot l\_m + \frac{\tan \left(\pi \cdot l\_m\right) \cdot \frac{-1}{F}}{F}\right)
\end{array}
Initial program 70.3%
associate-/r*70.3%
metadata-eval70.3%
add-sqr-sqrt37.5%
sqrt-prod64.4%
sqrt-div64.4%
associate-*l/64.4%
sqrt-div64.4%
metadata-eval64.4%
sqrt-prod41.2%
add-sqr-sqrt77.6%
Applied egg-rr77.6%
Final simplification77.6%
l\_m = (fabs.f64 l) l\_s = (copysign.f64 #s(literal 1 binary64) l) (FPCore (l_s F l_m) :precision binary64 (* l_s (- (* PI l_m) (/ (/ (tan (* PI l_m)) F) F))))
l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
return l_s * ((((double) M_PI) * l_m) - ((tan((((double) M_PI) * l_m)) / F) / F));
}
l\_m = Math.abs(l);
l\_s = Math.copySign(1.0, l);
public static double code(double l_s, double F, double l_m) {
return l_s * ((Math.PI * l_m) - ((Math.tan((Math.PI * l_m)) / F) / F));
}
l\_m = math.fabs(l) l\_s = math.copysign(1.0, l) def code(l_s, F, l_m): return l_s * ((math.pi * l_m) - ((math.tan((math.pi * l_m)) / F) / F))
l\_m = abs(l) l\_s = copysign(1.0, l) function code(l_s, F, l_m) return Float64(l_s * Float64(Float64(pi * l_m) - Float64(Float64(tan(Float64(pi * l_m)) / F) / F))) end
l\_m = abs(l); l\_s = sign(l) * abs(1.0); function tmp = code(l_s, F, l_m) tmp = l_s * ((pi * l_m) - ((tan((pi * l_m)) / F) / F)); end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := N[(l$95$s * N[(N[(Pi * l$95$m), $MachinePrecision] - N[(N[(N[Tan[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
l\_s \cdot \left(\pi \cdot l\_m - \frac{\frac{\tan \left(\pi \cdot l\_m\right)}{F}}{F}\right)
\end{array}
Initial program 70.3%
associate-*l/70.4%
*-un-lft-identity70.4%
associate-/r*77.6%
Applied egg-rr77.6%
l\_m = (fabs.f64 l) l\_s = (copysign.f64 #s(literal 1 binary64) l) (FPCore (l_s F l_m) :precision binary64 (* l_s (- (* PI l_m) (/ (/ (sin (* PI l_m)) F) F))))
l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
return l_s * ((((double) M_PI) * l_m) - ((sin((((double) M_PI) * l_m)) / F) / F));
}
l\_m = Math.abs(l);
l\_s = Math.copySign(1.0, l);
public static double code(double l_s, double F, double l_m) {
return l_s * ((Math.PI * l_m) - ((Math.sin((Math.PI * l_m)) / F) / F));
}
l\_m = math.fabs(l) l\_s = math.copysign(1.0, l) def code(l_s, F, l_m): return l_s * ((math.pi * l_m) - ((math.sin((math.pi * l_m)) / F) / F))
l\_m = abs(l) l\_s = copysign(1.0, l) function code(l_s, F, l_m) return Float64(l_s * Float64(Float64(pi * l_m) - Float64(Float64(sin(Float64(pi * l_m)) / F) / F))) end
l\_m = abs(l); l\_s = sign(l) * abs(1.0); function tmp = code(l_s, F, l_m) tmp = l_s * ((pi * l_m) - ((sin((pi * l_m)) / F) / F)); end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := N[(l$95$s * N[(N[(Pi * l$95$m), $MachinePrecision] - N[(N[(N[Sin[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
l\_s \cdot \left(\pi \cdot l\_m - \frac{\frac{\sin \left(\pi \cdot l\_m\right)}{F}}{F}\right)
\end{array}
Initial program 70.3%
associate-/r*70.3%
metadata-eval70.3%
add-sqr-sqrt37.5%
sqrt-prod64.4%
sqrt-div64.4%
tan-quot64.4%
frac-times64.4%
sqrt-div64.4%
metadata-eval64.4%
sqrt-prod41.2%
add-sqr-sqrt77.6%
Applied egg-rr77.6%
Taylor expanded in l around 0 97.0%
associate-*l/97.0%
*-un-lft-identity97.0%
Applied egg-rr97.0%
Taylor expanded in l around 0 77.0%
l\_m = (fabs.f64 l) l\_s = (copysign.f64 #s(literal 1 binary64) l) (FPCore (l_s F l_m) :precision binary64 (* l_s (- (* PI l_m) (/ (* l_m (/ PI F)) F))))
l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
return l_s * ((((double) M_PI) * l_m) - ((l_m * (((double) M_PI) / F)) / F));
}
l\_m = Math.abs(l);
l\_s = Math.copySign(1.0, l);
public static double code(double l_s, double F, double l_m) {
return l_s * ((Math.PI * l_m) - ((l_m * (Math.PI / F)) / F));
}
l\_m = math.fabs(l) l\_s = math.copysign(1.0, l) def code(l_s, F, l_m): return l_s * ((math.pi * l_m) - ((l_m * (math.pi / F)) / F))
l\_m = abs(l) l\_s = copysign(1.0, l) function code(l_s, F, l_m) return Float64(l_s * Float64(Float64(pi * l_m) - Float64(Float64(l_m * Float64(pi / F)) / F))) end
l\_m = abs(l); l\_s = sign(l) * abs(1.0); function tmp = code(l_s, F, l_m) tmp = l_s * ((pi * l_m) - ((l_m * (pi / F)) / F)); end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := N[(l$95$s * N[(N[(Pi * l$95$m), $MachinePrecision] - N[(N[(l$95$m * N[(Pi / F), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
l\_s \cdot \left(\pi \cdot l\_m - \frac{l\_m \cdot \frac{\pi}{F}}{F}\right)
\end{array}
Initial program 70.3%
*-commutative70.3%
sqr-neg70.3%
associate-*r/70.4%
*-rgt-identity70.4%
sqr-neg70.4%
Simplified70.4%
Taylor expanded in l around 0 63.0%
*-commutative63.0%
times-frac70.3%
Applied egg-rr70.3%
associate-*r/70.3%
Applied egg-rr70.3%
Final simplification70.3%
l\_m = (fabs.f64 l) l\_s = (copysign.f64 #s(literal 1 binary64) l) (FPCore (l_s F l_m) :precision binary64 (* l_s (- (* PI l_m) (* (/ PI F) (/ l_m F)))))
l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
return l_s * ((((double) M_PI) * l_m) - ((((double) M_PI) / F) * (l_m / F)));
}
l\_m = Math.abs(l);
l\_s = Math.copySign(1.0, l);
public static double code(double l_s, double F, double l_m) {
return l_s * ((Math.PI * l_m) - ((Math.PI / F) * (l_m / F)));
}
l\_m = math.fabs(l) l\_s = math.copysign(1.0, l) def code(l_s, F, l_m): return l_s * ((math.pi * l_m) - ((math.pi / F) * (l_m / F)))
l\_m = abs(l) l\_s = copysign(1.0, l) function code(l_s, F, l_m) return Float64(l_s * Float64(Float64(pi * l_m) - Float64(Float64(pi / F) * Float64(l_m / F)))) end
l\_m = abs(l); l\_s = sign(l) * abs(1.0); function tmp = code(l_s, F, l_m) tmp = l_s * ((pi * l_m) - ((pi / F) * (l_m / F))); end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := N[(l$95$s * N[(N[(Pi * l$95$m), $MachinePrecision] - N[(N[(Pi / F), $MachinePrecision] * N[(l$95$m / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)
\\
l\_s \cdot \left(\pi \cdot l\_m - \frac{\pi}{F} \cdot \frac{l\_m}{F}\right)
\end{array}
Initial program 70.3%
*-commutative70.3%
sqr-neg70.3%
associate-*r/70.4%
*-rgt-identity70.4%
sqr-neg70.4%
Simplified70.4%
Taylor expanded in l around 0 63.0%
*-commutative63.0%
times-frac70.3%
Applied egg-rr70.3%
herbie shell --seed 2024131
(FPCore (F l)
:name "VandenBroeck and Keller, Equation (6)"
:precision binary64
(- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))