VandenBroeck and Keller, Equation (6)

Percentage Accurate: 75.8% → 99.2%
Time: 23.8s
Alternatives: 11
Speedup: 1.0×

Specification

?
\[\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
 (- (* 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:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 11 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 75.8% accurate, 1.0× speedup?

\[\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
 (- (* 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}

Alternative 1: 99.2% accurate, 0.1× speedup?

\[\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 4 \cdot 10^{+15}:\\ \;\;\;\;\pi \cdot l\_m + \frac{\frac{-1}{F}}{\frac{F}{\tan \left(\pi \cdot l\_m\right)}}\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot l\_m + \frac{\frac{\sin \left(\pi \cdot l\_m\right) \cdot \frac{-1}{1 + {l\_m}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {l\_m}^{2} \cdot \left(-0.001388888888888889 \cdot \left({l\_m}^{2} \cdot \mathsf{log1p}\left(\mathsf{expm1}\left({\pi}^{6}\right)\right)\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}{F}}{F}\\ \end{array} \end{array} \]
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) 4e+15)
    (+ (* PI l_m) (/ (/ -1.0 F) (/ F (tan (* PI l_m)))))
    (+
     (* PI l_m)
     (/
      (/
       (*
        (sin (* PI l_m))
        (/
         -1.0
         (+
          1.0
          (*
           (pow l_m 2.0)
           (+
            (* -0.5 (pow PI 2.0))
            (*
             (pow l_m 2.0)
             (+
              (*
               -0.001388888888888889
               (* (pow l_m 2.0) (log1p (expm1 (pow PI 6.0)))))
              (* 0.041666666666666664 (pow PI 4.0)))))))))
       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) <= 4e+15) {
		tmp = (((double) M_PI) * l_m) + ((-1.0 / F) / (F / tan((((double) M_PI) * l_m))));
	} else {
		tmp = (((double) M_PI) * l_m) + (((sin((((double) M_PI) * l_m)) * (-1.0 / (1.0 + (pow(l_m, 2.0) * ((-0.5 * pow(((double) M_PI), 2.0)) + (pow(l_m, 2.0) * ((-0.001388888888888889 * (pow(l_m, 2.0) * log1p(expm1(pow(((double) M_PI), 6.0))))) + (0.041666666666666664 * pow(((double) M_PI), 4.0))))))))) / 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) <= 4e+15) {
		tmp = (Math.PI * l_m) + ((-1.0 / F) / (F / Math.tan((Math.PI * l_m))));
	} else {
		tmp = (Math.PI * l_m) + (((Math.sin((Math.PI * l_m)) * (-1.0 / (1.0 + (Math.pow(l_m, 2.0) * ((-0.5 * Math.pow(Math.PI, 2.0)) + (Math.pow(l_m, 2.0) * ((-0.001388888888888889 * (Math.pow(l_m, 2.0) * Math.log1p(Math.expm1(Math.pow(Math.PI, 6.0))))) + (0.041666666666666664 * Math.pow(Math.PI, 4.0))))))))) / 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) <= 4e+15:
		tmp = (math.pi * l_m) + ((-1.0 / F) / (F / math.tan((math.pi * l_m))))
	else:
		tmp = (math.pi * l_m) + (((math.sin((math.pi * l_m)) * (-1.0 / (1.0 + (math.pow(l_m, 2.0) * ((-0.5 * math.pow(math.pi, 2.0)) + (math.pow(l_m, 2.0) * ((-0.001388888888888889 * (math.pow(l_m, 2.0) * math.log1p(math.expm1(math.pow(math.pi, 6.0))))) + (0.041666666666666664 * math.pow(math.pi, 4.0))))))))) / 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) <= 4e+15)
		tmp = Float64(Float64(pi * l_m) + Float64(Float64(-1.0 / F) / Float64(F / tan(Float64(pi * l_m)))));
	else
		tmp = Float64(Float64(pi * l_m) + Float64(Float64(Float64(sin(Float64(pi * l_m)) * Float64(-1.0 / Float64(1.0 + Float64((l_m ^ 2.0) * Float64(Float64(-0.5 * (pi ^ 2.0)) + Float64((l_m ^ 2.0) * Float64(Float64(-0.001388888888888889 * Float64((l_m ^ 2.0) * log1p(expm1((pi ^ 6.0))))) + Float64(0.041666666666666664 * (pi ^ 4.0))))))))) / F) / F));
	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_] := N[(l$95$s * If[LessEqual[N[(Pi * l$95$m), $MachinePrecision], 4e+15], N[(N[(Pi * l$95$m), $MachinePrecision] + N[(N[(-1.0 / F), $MachinePrecision] / N[(F / N[Tan[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * l$95$m), $MachinePrecision] + N[(N[(N[(N[Sin[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / N[(1.0 + N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(-0.5 * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(-0.001388888888888889 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[Log[1 + N[(Exp[N[Power[Pi, 6.0], $MachinePrecision]] - 1), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(0.041666666666666664 * N[Power[Pi, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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 \begin{array}{l}
\mathbf{if}\;\pi \cdot l\_m \leq 4 \cdot 10^{+15}:\\
\;\;\;\;\pi \cdot l\_m + \frac{\frac{-1}{F}}{\frac{F}{\tan \left(\pi \cdot l\_m\right)}}\\

\mathbf{else}:\\
\;\;\;\;\pi \cdot l\_m + \frac{\frac{\sin \left(\pi \cdot l\_m\right) \cdot \frac{-1}{1 + {l\_m}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {l\_m}^{2} \cdot \left(-0.001388888888888889 \cdot \left({l\_m}^{2} \cdot \mathsf{log1p}\left(\mathsf{expm1}\left({\pi}^{6}\right)\right)\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}{F}}{F}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (PI.f64) l) < 4e15

    1. Initial program 80.7%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Step-by-step derivation
      1. *-commutative80.7%

        \[\leadsto \pi \cdot \ell - \color{blue}{\tan \left(\pi \cdot \ell\right) \cdot \frac{1}{F \cdot F}} \]
      2. sqr-neg80.7%

        \[\leadsto \pi \cdot \ell - \tan \left(\pi \cdot \ell\right) \cdot \frac{1}{\color{blue}{\left(-F\right) \cdot \left(-F\right)}} \]
      3. associate-*r/81.0%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\tan \left(\pi \cdot \ell\right) \cdot 1}{\left(-F\right) \cdot \left(-F\right)}} \]
      4. sqr-neg81.0%

        \[\leadsto \pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right) \cdot 1}{\color{blue}{F \cdot F}} \]
      5. *-rgt-identity81.0%

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\tan \left(\pi \cdot \ell\right)}}{F \cdot F} \]
    3. Simplified81.0%

      \[\leadsto \color{blue}{\pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-un-lft-identity81.0%

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{1 \cdot \tan \left(\pi \cdot \ell\right)}}{F \cdot F} \]
      2. associate-*l/80.7%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)} \]
      3. add-sqr-sqrt80.7%

        \[\leadsto \pi \cdot \ell - \color{blue}{\left(\sqrt{\frac{1}{F \cdot F}} \cdot \sqrt{\frac{1}{F \cdot F}}\right)} \cdot \tan \left(\pi \cdot \ell\right) \]
      4. associate-*l*80.6%

        \[\leadsto \pi \cdot \ell - \color{blue}{\sqrt{\frac{1}{F \cdot F}} \cdot \left(\sqrt{\frac{1}{F \cdot F}} \cdot \tan \left(\pi \cdot \ell\right)\right)} \]
      5. sqrt-div80.7%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\sqrt{1}}{\sqrt{F \cdot F}}} \cdot \left(\sqrt{\frac{1}{F \cdot F}} \cdot \tan \left(\pi \cdot \ell\right)\right) \]
      6. metadata-eval80.7%

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{1}}{\sqrt{F \cdot F}} \cdot \left(\sqrt{\frac{1}{F \cdot F}} \cdot \tan \left(\pi \cdot \ell\right)\right) \]
      7. sqrt-prod42.4%

        \[\leadsto \pi \cdot \ell - \frac{1}{\color{blue}{\sqrt{F} \cdot \sqrt{F}}} \cdot \left(\sqrt{\frac{1}{F \cdot F}} \cdot \tan \left(\pi \cdot \ell\right)\right) \]
      8. add-sqr-sqrt67.5%

        \[\leadsto \pi \cdot \ell - \frac{1}{\color{blue}{F}} \cdot \left(\sqrt{\frac{1}{F \cdot F}} \cdot \tan \left(\pi \cdot \ell\right)\right) \]
      9. sqrt-div67.5%

        \[\leadsto \pi \cdot \ell - \frac{1}{F} \cdot \left(\color{blue}{\frac{\sqrt{1}}{\sqrt{F \cdot F}}} \cdot \tan \left(\pi \cdot \ell\right)\right) \]
      10. metadata-eval67.5%

        \[\leadsto \pi \cdot \ell - \frac{1}{F} \cdot \left(\frac{\color{blue}{1}}{\sqrt{F \cdot F}} \cdot \tan \left(\pi \cdot \ell\right)\right) \]
      11. sqrt-prod43.9%

        \[\leadsto \pi \cdot \ell - \frac{1}{F} \cdot \left(\frac{1}{\color{blue}{\sqrt{F} \cdot \sqrt{F}}} \cdot \tan \left(\pi \cdot \ell\right)\right) \]
      12. add-sqr-sqrt87.4%

        \[\leadsto \pi \cdot \ell - \frac{1}{F} \cdot \left(\frac{1}{\color{blue}{F}} \cdot \tan \left(\pi \cdot \ell\right)\right) \]
    6. Applied egg-rr87.4%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1}{F} \cdot \left(\frac{1}{F} \cdot \tan \left(\pi \cdot \ell\right)\right)} \]
    7. Step-by-step derivation
      1. associate-/r/87.5%

        \[\leadsto \pi \cdot \ell - \frac{1}{F} \cdot \color{blue}{\frac{1}{\frac{F}{\tan \left(\pi \cdot \ell\right)}}} \]
      2. un-div-inv87.5%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{1}{F}}{\frac{F}{\tan \left(\pi \cdot \ell\right)}}} \]
    8. Applied egg-rr87.5%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{1}{F}}{\frac{F}{\tan \left(\pi \cdot \ell\right)}}} \]

    if 4e15 < (*.f64 (PI.f64) l)

    1. Initial program 62.1%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. associate-*l/62.1%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1 \cdot \tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
      2. *-un-lft-identity62.1%

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\tan \left(\pi \cdot \ell\right)}}{F \cdot F} \]
      3. associate-/r*62.1%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
    4. Applied egg-rr62.1%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
    5. Step-by-step derivation
      1. tan-quot62.1%

        \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\frac{\sin \left(\pi \cdot \ell\right)}{\cos \left(\pi \cdot \ell\right)}}}{F}}{F} \]
      2. div-inv62.1%

        \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\cos \left(\pi \cdot \ell\right)}}}{F}}{F} \]
    6. Applied egg-rr62.1%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\cos \left(\pi \cdot \ell\right)}}}{F}}{F} \]
    7. Taylor expanded in l around 0 95.2%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\color{blue}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(-0.001388888888888889 \cdot \left({\ell}^{2} \cdot {\pi}^{6}\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}}{F}}{F} \]
    8. Step-by-step derivation
      1. log1p-expm1-u99.6%

        \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(-0.001388888888888889 \cdot \left({\ell}^{2} \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left({\pi}^{6}\right)\right)}\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}{F}}{F} \]
    9. Applied egg-rr99.6%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(-0.001388888888888889 \cdot \left({\ell}^{2} \cdot \color{blue}{\mathsf{log1p}\left(\mathsf{expm1}\left({\pi}^{6}\right)\right)}\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}{F}}{F} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification90.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq 4 \cdot 10^{+15}:\\ \;\;\;\;\pi \cdot \ell + \frac{\frac{-1}{F}}{\frac{F}{\tan \left(\pi \cdot \ell\right)}}\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell + \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{-1}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(-0.001388888888888889 \cdot \left({\ell}^{2} \cdot \mathsf{log1p}\left(\mathsf{expm1}\left({\pi}^{6}\right)\right)\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}{F}}{F}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 96.5% accurate, 0.1× speedup?

\[\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{\left|\sin \left(\pi \cdot l\_m\right)\right| \cdot \frac{1}{-1 - {l\_m}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {l\_m}^{2} \cdot \left(0.041666666666666664 \cdot {\pi}^{4} + -0.001388888888888889 \cdot \left({l\_m}^{2} \cdot {\pi}^{6}\right)\right)\right)}}{F}}{F}\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
 (*
  l_s
  (+
   (* PI l_m)
   (/
    (/
     (*
      (fabs (sin (* PI l_m)))
      (/
       1.0
       (-
        -1.0
        (*
         (pow l_m 2.0)
         (+
          (* -0.5 (pow PI 2.0))
          (*
           (pow l_m 2.0)
           (+
            (* 0.041666666666666664 (pow PI 4.0))
            (* -0.001388888888888889 (* (pow l_m 2.0) (pow PI 6.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) + (((fabs(sin((((double) M_PI) * l_m))) * (1.0 / (-1.0 - (pow(l_m, 2.0) * ((-0.5 * pow(((double) M_PI), 2.0)) + (pow(l_m, 2.0) * ((0.041666666666666664 * pow(((double) M_PI), 4.0)) + (-0.001388888888888889 * (pow(l_m, 2.0) * pow(((double) M_PI), 6.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.abs(Math.sin((Math.PI * l_m))) * (1.0 / (-1.0 - (Math.pow(l_m, 2.0) * ((-0.5 * Math.pow(Math.PI, 2.0)) + (Math.pow(l_m, 2.0) * ((0.041666666666666664 * Math.pow(Math.PI, 4.0)) + (-0.001388888888888889 * (Math.pow(l_m, 2.0) * Math.pow(Math.PI, 6.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.fabs(math.sin((math.pi * l_m))) * (1.0 / (-1.0 - (math.pow(l_m, 2.0) * ((-0.5 * math.pow(math.pi, 2.0)) + (math.pow(l_m, 2.0) * ((0.041666666666666664 * math.pow(math.pi, 4.0)) + (-0.001388888888888889 * (math.pow(l_m, 2.0) * math.pow(math.pi, 6.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(Float64(abs(sin(Float64(pi * l_m))) * Float64(1.0 / Float64(-1.0 - Float64((l_m ^ 2.0) * Float64(Float64(-0.5 * (pi ^ 2.0)) + Float64((l_m ^ 2.0) * Float64(Float64(0.041666666666666664 * (pi ^ 4.0)) + Float64(-0.001388888888888889 * Float64((l_m ^ 2.0) * (pi ^ 6.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) + (((abs(sin((pi * l_m))) * (1.0 / (-1.0 - ((l_m ^ 2.0) * ((-0.5 * (pi ^ 2.0)) + ((l_m ^ 2.0) * ((0.041666666666666664 * (pi ^ 4.0)) + (-0.001388888888888889 * ((l_m ^ 2.0) * (pi ^ 6.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[(N[Abs[N[Sin[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[(-1.0 - N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(-0.5 * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(0.041666666666666664 * N[Power[Pi, 4.0], $MachinePrecision]), $MachinePrecision] + N[(-0.001388888888888889 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[Power[Pi, 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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{\left|\sin \left(\pi \cdot l\_m\right)\right| \cdot \frac{1}{-1 - {l\_m}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {l\_m}^{2} \cdot \left(0.041666666666666664 \cdot {\pi}^{4} + -0.001388888888888889 \cdot \left({l\_m}^{2} \cdot {\pi}^{6}\right)\right)\right)}}{F}}{F}\right)
\end{array}
Derivation
  1. Initial program 76.0%

    \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l/76.2%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1 \cdot \tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
    2. *-un-lft-identity76.2%

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\tan \left(\pi \cdot \ell\right)}}{F \cdot F} \]
    3. associate-/r*81.1%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
  4. Applied egg-rr81.1%

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
  5. Step-by-step derivation
    1. tan-quot81.1%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\frac{\sin \left(\pi \cdot \ell\right)}{\cos \left(\pi \cdot \ell\right)}}}{F}}{F} \]
    2. div-inv81.1%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\cos \left(\pi \cdot \ell\right)}}}{F}}{F} \]
  6. Applied egg-rr81.1%

    \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\cos \left(\pi \cdot \ell\right)}}}{F}}{F} \]
  7. Taylor expanded in l around 0 96.9%

    \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\color{blue}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(-0.001388888888888889 \cdot \left({\ell}^{2} \cdot {\pi}^{6}\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}}{F}}{F} \]
  8. Step-by-step derivation
    1. add-sqr-sqrt47.5%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\left(\sqrt{\sin \left(\pi \cdot \ell\right)} \cdot \sqrt{\sin \left(\pi \cdot \ell\right)}\right)} \cdot \frac{1}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(-0.001388888888888889 \cdot \left({\ell}^{2} \cdot {\pi}^{6}\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}{F}}{F} \]
    2. sqrt-unprod78.4%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\sqrt{\sin \left(\pi \cdot \ell\right) \cdot \sin \left(\pi \cdot \ell\right)}} \cdot \frac{1}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(-0.001388888888888889 \cdot \left({\ell}^{2} \cdot {\pi}^{6}\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}{F}}{F} \]
    3. pow278.4%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\sqrt{\color{blue}{{\sin \left(\pi \cdot \ell\right)}^{2}}} \cdot \frac{1}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(-0.001388888888888889 \cdot \left({\ell}^{2} \cdot {\pi}^{6}\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}{F}}{F} \]
  9. Applied egg-rr78.4%

    \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\sqrt{{\sin \left(\pi \cdot \ell\right)}^{2}}} \cdot \frac{1}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(-0.001388888888888889 \cdot \left({\ell}^{2} \cdot {\pi}^{6}\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}{F}}{F} \]
  10. Step-by-step derivation
    1. unpow278.4%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\sqrt{\color{blue}{\sin \left(\pi \cdot \ell\right) \cdot \sin \left(\pi \cdot \ell\right)}} \cdot \frac{1}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(-0.001388888888888889 \cdot \left({\ell}^{2} \cdot {\pi}^{6}\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}{F}}{F} \]
    2. rem-sqrt-square84.3%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\left|\sin \left(\pi \cdot \ell\right)\right|} \cdot \frac{1}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(-0.001388888888888889 \cdot \left({\ell}^{2} \cdot {\pi}^{6}\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}{F}}{F} \]
    3. *-commutative84.3%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\left|\sin \color{blue}{\left(\ell \cdot \pi\right)}\right| \cdot \frac{1}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(-0.001388888888888889 \cdot \left({\ell}^{2} \cdot {\pi}^{6}\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}{F}}{F} \]
  11. Simplified84.3%

    \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\left|\sin \left(\ell \cdot \pi\right)\right|} \cdot \frac{1}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(-0.001388888888888889 \cdot \left({\ell}^{2} \cdot {\pi}^{6}\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}{F}}{F} \]
  12. Final simplification84.3%

    \[\leadsto \pi \cdot \ell + \frac{\frac{\left|\sin \left(\pi \cdot \ell\right)\right| \cdot \frac{1}{-1 - {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(0.041666666666666664 \cdot {\pi}^{4} + -0.001388888888888889 \cdot \left({\ell}^{2} \cdot {\pi}^{6}\right)\right)\right)}}{F}}{F} \]
  13. Add Preprocessing

Alternative 3: 96.6% accurate, 0.2× speedup?

\[\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) \cdot \frac{-1}{1 + {l\_m}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {l\_m}^{2} \cdot \left(0.041666666666666664 \cdot {\pi}^{4} + -0.001388888888888889 \cdot \left({\pi}^{6} \cdot \left(l\_m \cdot l\_m\right)\right)\right)\right)}}{F}}{F}\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
 (*
  l_s
  (+
   (* PI l_m)
   (/
    (/
     (*
      (sin (* PI l_m))
      (/
       -1.0
       (+
        1.0
        (*
         (pow l_m 2.0)
         (+
          (* -0.5 (pow PI 2.0))
          (*
           (pow l_m 2.0)
           (+
            (* 0.041666666666666664 (pow PI 4.0))
            (* -0.001388888888888889 (* (pow PI 6.0) (* l_m 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)) * (-1.0 / (1.0 + (pow(l_m, 2.0) * ((-0.5 * pow(((double) M_PI), 2.0)) + (pow(l_m, 2.0) * ((0.041666666666666664 * pow(((double) M_PI), 4.0)) + (-0.001388888888888889 * (pow(((double) M_PI), 6.0) * (l_m * 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)) * (-1.0 / (1.0 + (Math.pow(l_m, 2.0) * ((-0.5 * Math.pow(Math.PI, 2.0)) + (Math.pow(l_m, 2.0) * ((0.041666666666666664 * Math.pow(Math.PI, 4.0)) + (-0.001388888888888889 * (Math.pow(Math.PI, 6.0) * (l_m * 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)) * (-1.0 / (1.0 + (math.pow(l_m, 2.0) * ((-0.5 * math.pow(math.pi, 2.0)) + (math.pow(l_m, 2.0) * ((0.041666666666666664 * math.pow(math.pi, 4.0)) + (-0.001388888888888889 * (math.pow(math.pi, 6.0) * (l_m * 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(Float64(sin(Float64(pi * l_m)) * Float64(-1.0 / Float64(1.0 + Float64((l_m ^ 2.0) * Float64(Float64(-0.5 * (pi ^ 2.0)) + Float64((l_m ^ 2.0) * Float64(Float64(0.041666666666666664 * (pi ^ 4.0)) + Float64(-0.001388888888888889 * Float64((pi ^ 6.0) * Float64(l_m * 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)) * (-1.0 / (1.0 + ((l_m ^ 2.0) * ((-0.5 * (pi ^ 2.0)) + ((l_m ^ 2.0) * ((0.041666666666666664 * (pi ^ 4.0)) + (-0.001388888888888889 * ((pi ^ 6.0) * (l_m * 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[(N[Sin[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / N[(1.0 + N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(-0.5 * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision] + N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(0.041666666666666664 * N[Power[Pi, 4.0], $MachinePrecision]), $MachinePrecision] + N[(-0.001388888888888889 * N[(N[Power[Pi, 6.0], $MachinePrecision] * N[(l$95$m * l$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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) \cdot \frac{-1}{1 + {l\_m}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {l\_m}^{2} \cdot \left(0.041666666666666664 \cdot {\pi}^{4} + -0.001388888888888889 \cdot \left({\pi}^{6} \cdot \left(l\_m \cdot l\_m\right)\right)\right)\right)}}{F}}{F}\right)
\end{array}
Derivation
  1. Initial program 76.0%

    \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l/76.2%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1 \cdot \tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
    2. *-un-lft-identity76.2%

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\tan \left(\pi \cdot \ell\right)}}{F \cdot F} \]
    3. associate-/r*81.1%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
  4. Applied egg-rr81.1%

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
  5. Step-by-step derivation
    1. tan-quot81.1%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\frac{\sin \left(\pi \cdot \ell\right)}{\cos \left(\pi \cdot \ell\right)}}}{F}}{F} \]
    2. div-inv81.1%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\cos \left(\pi \cdot \ell\right)}}}{F}}{F} \]
  6. Applied egg-rr81.1%

    \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\cos \left(\pi \cdot \ell\right)}}}{F}}{F} \]
  7. Taylor expanded in l around 0 96.9%

    \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\color{blue}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(-0.001388888888888889 \cdot \left({\ell}^{2} \cdot {\pi}^{6}\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}}{F}}{F} \]
  8. Step-by-step derivation
    1. unpow296.9%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(-0.001388888888888889 \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot {\pi}^{6}\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}{F}}{F} \]
  9. Applied egg-rr96.9%

    \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(-0.001388888888888889 \cdot \left(\color{blue}{\left(\ell \cdot \ell\right)} \cdot {\pi}^{6}\right) + 0.041666666666666664 \cdot {\pi}^{4}\right)\right)}}{F}}{F} \]
  10. Final simplification96.9%

    \[\leadsto \pi \cdot \ell + \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{-1}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + {\ell}^{2} \cdot \left(0.041666666666666664 \cdot {\pi}^{4} + -0.001388888888888889 \cdot \left({\pi}^{6} \cdot \left(\ell \cdot \ell\right)\right)\right)\right)}}{F}}{F} \]
  11. Add Preprocessing

Alternative 4: 95.4% accurate, 0.2× speedup?

\[\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) \cdot \frac{1}{-1 - {l\_m}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + 0.041666666666666664 \cdot \left({l\_m}^{2} \cdot {\pi}^{4}\right)\right)}}{F}}{F}\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
 (*
  l_s
  (+
   (* PI l_m)
   (/
    (/
     (*
      (sin (* PI l_m))
      (/
       1.0
       (-
        -1.0
        (*
         (pow l_m 2.0)
         (+
          (* -0.5 (pow PI 2.0))
          (* 0.041666666666666664 (* (pow l_m 2.0) (pow PI 4.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) + (((sin((((double) M_PI) * l_m)) * (1.0 / (-1.0 - (pow(l_m, 2.0) * ((-0.5 * pow(((double) M_PI), 2.0)) + (0.041666666666666664 * (pow(l_m, 2.0) * pow(((double) M_PI), 4.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.sin((Math.PI * l_m)) * (1.0 / (-1.0 - (Math.pow(l_m, 2.0) * ((-0.5 * Math.pow(Math.PI, 2.0)) + (0.041666666666666664 * (Math.pow(l_m, 2.0) * Math.pow(Math.PI, 4.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.sin((math.pi * l_m)) * (1.0 / (-1.0 - (math.pow(l_m, 2.0) * ((-0.5 * math.pow(math.pi, 2.0)) + (0.041666666666666664 * (math.pow(l_m, 2.0) * math.pow(math.pi, 4.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(Float64(sin(Float64(pi * l_m)) * Float64(1.0 / Float64(-1.0 - Float64((l_m ^ 2.0) * Float64(Float64(-0.5 * (pi ^ 2.0)) + Float64(0.041666666666666664 * Float64((l_m ^ 2.0) * (pi ^ 4.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) + (((sin((pi * l_m)) * (1.0 / (-1.0 - ((l_m ^ 2.0) * ((-0.5 * (pi ^ 2.0)) + (0.041666666666666664 * ((l_m ^ 2.0) * (pi ^ 4.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[(N[Sin[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision] * N[(1.0 / N[(-1.0 - N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[(N[(-0.5 * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision] + N[(0.041666666666666664 * N[(N[Power[l$95$m, 2.0], $MachinePrecision] * N[Power[Pi, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $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) \cdot \frac{1}{-1 - {l\_m}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + 0.041666666666666664 \cdot \left({l\_m}^{2} \cdot {\pi}^{4}\right)\right)}}{F}}{F}\right)
\end{array}
Derivation
  1. Initial program 76.0%

    \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l/76.2%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1 \cdot \tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
    2. *-un-lft-identity76.2%

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\tan \left(\pi \cdot \ell\right)}}{F \cdot F} \]
    3. associate-/r*81.1%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
  4. Applied egg-rr81.1%

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
  5. Step-by-step derivation
    1. tan-quot81.1%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\frac{\sin \left(\pi \cdot \ell\right)}{\cos \left(\pi \cdot \ell\right)}}}{F}}{F} \]
    2. div-inv81.1%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\cos \left(\pi \cdot \ell\right)}}}{F}}{F} \]
  6. Applied egg-rr81.1%

    \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\cos \left(\pi \cdot \ell\right)}}}{F}}{F} \]
  7. Taylor expanded in l around 0 94.1%

    \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\color{blue}{1 + {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + 0.041666666666666664 \cdot \left({\ell}^{2} \cdot {\pi}^{4}\right)\right)}}}{F}}{F} \]
  8. Final simplification94.1%

    \[\leadsto \pi \cdot \ell + \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{-1 - {\ell}^{2} \cdot \left(-0.5 \cdot {\pi}^{2} + 0.041666666666666664 \cdot \left({\ell}^{2} \cdot {\pi}^{4}\right)\right)}}{F}}{F} \]
  9. Add Preprocessing

Alternative 5: 91.7% accurate, 0.4× speedup?

\[\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) \cdot \frac{-1}{\mathsf{fma}\left(-0.5, {\left(\pi \cdot l\_m\right)}^{2}, 1\right)}}{F}}{F}\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
 (*
  l_s
  (+
   (* PI l_m)
   (/
    (/ (* (sin (* PI l_m)) (/ -1.0 (fma -0.5 (pow (* PI l_m) 2.0) 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) + (((sin((((double) M_PI) * l_m)) * (-1.0 / fma(-0.5, pow((((double) M_PI) * l_m), 2.0), 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(Float64(sin(Float64(pi * l_m)) * Float64(-1.0 / fma(-0.5, (Float64(pi * l_m) ^ 2.0), 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[(N[Sin[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision] * N[(-1.0 / N[(-0.5 * N[Power[N[(Pi * l$95$m), $MachinePrecision], 2.0], $MachinePrecision] + 1.0), $MachinePrecision]), $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) \cdot \frac{-1}{\mathsf{fma}\left(-0.5, {\left(\pi \cdot l\_m\right)}^{2}, 1\right)}}{F}}{F}\right)
\end{array}
Derivation
  1. Initial program 76.0%

    \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l/76.2%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1 \cdot \tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
    2. *-un-lft-identity76.2%

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\tan \left(\pi \cdot \ell\right)}}{F \cdot F} \]
    3. associate-/r*81.1%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
  4. Applied egg-rr81.1%

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
  5. Step-by-step derivation
    1. tan-quot81.1%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\frac{\sin \left(\pi \cdot \ell\right)}{\cos \left(\pi \cdot \ell\right)}}}{F}}{F} \]
    2. div-inv81.1%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\cos \left(\pi \cdot \ell\right)}}}{F}}{F} \]
  6. Applied egg-rr81.1%

    \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\cos \left(\pi \cdot \ell\right)}}}{F}}{F} \]
  7. Taylor expanded in l around 0 90.5%

    \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\color{blue}{1 + -0.5 \cdot \left({\ell}^{2} \cdot {\pi}^{2}\right)}}}{F}}{F} \]
  8. Step-by-step derivation
    1. +-commutative90.5%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\color{blue}{-0.5 \cdot \left({\ell}^{2} \cdot {\pi}^{2}\right) + 1}}}{F}}{F} \]
    2. fma-define90.5%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\color{blue}{\mathsf{fma}\left(-0.5, {\ell}^{2} \cdot {\pi}^{2}, 1\right)}}}{F}}{F} \]
    3. *-commutative90.5%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\mathsf{fma}\left(-0.5, \color{blue}{{\pi}^{2} \cdot {\ell}^{2}}, 1\right)}}{F}}{F} \]
    4. unpow290.5%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\mathsf{fma}\left(-0.5, \color{blue}{\left(\pi \cdot \pi\right)} \cdot {\ell}^{2}, 1\right)}}{F}}{F} \]
    5. unpow290.5%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\mathsf{fma}\left(-0.5, \left(\pi \cdot \pi\right) \cdot \color{blue}{\left(\ell \cdot \ell\right)}, 1\right)}}{F}}{F} \]
    6. swap-sqr90.5%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\mathsf{fma}\left(-0.5, \color{blue}{\left(\pi \cdot \ell\right) \cdot \left(\pi \cdot \ell\right)}, 1\right)}}{F}}{F} \]
    7. unpow290.5%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\mathsf{fma}\left(-0.5, \color{blue}{{\left(\pi \cdot \ell\right)}^{2}}, 1\right)}}{F}}{F} \]
    8. *-commutative90.5%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\mathsf{fma}\left(-0.5, {\color{blue}{\left(\ell \cdot \pi\right)}}^{2}, 1\right)}}{F}}{F} \]
  9. Simplified90.5%

    \[\leadsto \pi \cdot \ell - \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{1}{\color{blue}{\mathsf{fma}\left(-0.5, {\left(\ell \cdot \pi\right)}^{2}, 1\right)}}}{F}}{F} \]
  10. Final simplification90.5%

    \[\leadsto \pi \cdot \ell + \frac{\frac{\sin \left(\pi \cdot \ell\right) \cdot \frac{-1}{\mathsf{fma}\left(-0.5, {\left(\pi \cdot \ell\right)}^{2}, 1\right)}}{F}}{F} \]
  11. Add Preprocessing

Alternative 6: 81.7% accurate, 0.4× speedup?

\[\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(l\_m \cdot \sqrt[3]{{\pi}^{3}}\right)}{F}}{F}\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
 (* l_s (- (* PI l_m) (/ (/ (tan (* l_m (cbrt (pow PI 3.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((l_m * cbrt(pow(((double) M_PI), 3.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((l_m * Math.cbrt(Math.pow(Math.PI, 3.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(l_m * cbrt((pi ^ 3.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[(l$95$m * N[Power[N[Power[Pi, 3.0], $MachinePrecision], 1/3], $MachinePrecision]), $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(l\_m \cdot \sqrt[3]{{\pi}^{3}}\right)}{F}}{F}\right)
\end{array}
Derivation
  1. Initial program 76.0%

    \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l/76.2%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1 \cdot \tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
    2. *-un-lft-identity76.2%

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\tan \left(\pi \cdot \ell\right)}}{F \cdot F} \]
    3. associate-/r*81.1%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
  4. Applied egg-rr81.1%

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
  5. Step-by-step derivation
    1. add-cbrt-cube81.1%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \left(\color{blue}{\sqrt[3]{\left(\pi \cdot \pi\right) \cdot \pi}} \cdot \ell\right)}{F}}{F} \]
    2. pow381.1%

      \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \left(\sqrt[3]{\color{blue}{{\pi}^{3}}} \cdot \ell\right)}{F}}{F} \]
  6. Applied egg-rr81.1%

    \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \left(\color{blue}{\sqrt[3]{{\pi}^{3}}} \cdot \ell\right)}{F}}{F} \]
  7. Final simplification81.1%

    \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \left(\ell \cdot \sqrt[3]{{\pi}^{3}}\right)}{F}}{F} \]
  8. Add Preprocessing

Alternative 7: 81.6% accurate, 1.0× speedup?

\[\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 10^{-57}:\\ \;\;\;\;\pi \cdot l\_m - \frac{\frac{l\_m}{F}}{\frac{F}{\pi}}\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot l\_m - \frac{\tan \left(\pi \cdot l\_m\right)}{F \cdot F}\\ \end{array} \end{array} \]
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) 1e-57)
    (- (* PI l_m) (/ (/ l_m F) (/ F PI)))
    (- (* 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) <= 1e-57) {
		tmp = (((double) M_PI) * l_m) - ((l_m / F) / (F / ((double) M_PI)));
	} 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) <= 1e-57) {
		tmp = (Math.PI * l_m) - ((l_m / F) / (F / Math.PI));
	} 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) <= 1e-57:
		tmp = (math.pi * l_m) - ((l_m / F) / (F / math.pi))
	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) <= 1e-57)
		tmp = Float64(Float64(pi * l_m) - Float64(Float64(l_m / F) / Float64(F / pi)));
	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) <= 1e-57)
		tmp = (pi * l_m) - ((l_m / F) / (F / pi));
	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], 1e-57], N[(N[(Pi * l$95$m), $MachinePrecision] - N[(N[(l$95$m / F), $MachinePrecision] / N[(F / Pi), $MachinePrecision]), $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 10^{-57}:\\
\;\;\;\;\pi \cdot l\_m - \frac{\frac{l\_m}{F}}{\frac{F}{\pi}}\\

\mathbf{else}:\\
\;\;\;\;\pi \cdot l\_m - \frac{\tan \left(\pi \cdot l\_m\right)}{F \cdot F}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (PI.f64) l) < 9.99999999999999955e-58

    1. Initial program 79.6%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Step-by-step derivation
      1. *-commutative79.6%

        \[\leadsto \pi \cdot \ell - \color{blue}{\tan \left(\pi \cdot \ell\right) \cdot \frac{1}{F \cdot F}} \]
      2. sqr-neg79.6%

        \[\leadsto \pi \cdot \ell - \tan \left(\pi \cdot \ell\right) \cdot \frac{1}{\color{blue}{\left(-F\right) \cdot \left(-F\right)}} \]
      3. associate-*r/80.0%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\tan \left(\pi \cdot \ell\right) \cdot 1}{\left(-F\right) \cdot \left(-F\right)}} \]
      4. sqr-neg80.0%

        \[\leadsto \pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right) \cdot 1}{\color{blue}{F \cdot F}} \]
      5. *-rgt-identity80.0%

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\tan \left(\pi \cdot \ell\right)}}{F \cdot F} \]
    3. Simplified80.0%

      \[\leadsto \color{blue}{\pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
    4. Add Preprocessing
    5. Taylor expanded in l around 0 74.7%

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\ell \cdot \pi}}{F \cdot F} \]
    6. Step-by-step derivation
      1. *-commutative74.7%

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\pi \cdot \ell}}{F \cdot F} \]
      2. times-frac82.2%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\pi}{F} \cdot \frac{\ell}{F}} \]
    7. Applied egg-rr82.2%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\pi}{F} \cdot \frac{\ell}{F}} \]
    8. Step-by-step derivation
      1. *-commutative82.2%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
      2. clear-num82.1%

        \[\leadsto \pi \cdot \ell - \frac{\ell}{F} \cdot \color{blue}{\frac{1}{\frac{F}{\pi}}} \]
      3. un-div-inv82.2%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\ell}{F}}{\frac{F}{\pi}}} \]
    9. Applied egg-rr82.2%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\ell}{F}}{\frac{F}{\pi}}} \]

    if 9.99999999999999955e-58 < (*.f64 (PI.f64) l)

    1. Initial program 67.1%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Step-by-step derivation
      1. *-commutative67.1%

        \[\leadsto \pi \cdot \ell - \color{blue}{\tan \left(\pi \cdot \ell\right) \cdot \frac{1}{F \cdot F}} \]
      2. sqr-neg67.1%

        \[\leadsto \pi \cdot \ell - \tan \left(\pi \cdot \ell\right) \cdot \frac{1}{\color{blue}{\left(-F\right) \cdot \left(-F\right)}} \]
      3. associate-*r/67.1%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\tan \left(\pi \cdot \ell\right) \cdot 1}{\left(-F\right) \cdot \left(-F\right)}} \]
      4. sqr-neg67.1%

        \[\leadsto \pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right) \cdot 1}{\color{blue}{F \cdot F}} \]
      5. *-rgt-identity67.1%

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\tan \left(\pi \cdot \ell\right)}}{F \cdot F} \]
    3. Simplified67.1%

      \[\leadsto \color{blue}{\pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
    4. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 8: 81.7% accurate, 1.0× speedup?

\[\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{-1}{F}}{\frac{F}{\tan \left(\pi \cdot l\_m\right)}}\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
 (* l_s (+ (* PI l_m) (/ (/ -1.0 F) (/ F (tan (* 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) + ((-1.0 / F) / (F / tan((((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) + ((-1.0 / F) / (F / Math.tan((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) + ((-1.0 / F) / (F / math.tan((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(-1.0 / F) / Float64(F / tan(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) + ((-1.0 / F) / (F / tan((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[(-1.0 / F), $MachinePrecision] / N[(F / N[Tan[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{\frac{-1}{F}}{\frac{F}{\tan \left(\pi \cdot l\_m\right)}}\right)
\end{array}
Derivation
  1. Initial program 76.0%

    \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
  2. Step-by-step derivation
    1. *-commutative76.0%

      \[\leadsto \pi \cdot \ell - \color{blue}{\tan \left(\pi \cdot \ell\right) \cdot \frac{1}{F \cdot F}} \]
    2. sqr-neg76.0%

      \[\leadsto \pi \cdot \ell - \tan \left(\pi \cdot \ell\right) \cdot \frac{1}{\color{blue}{\left(-F\right) \cdot \left(-F\right)}} \]
    3. associate-*r/76.2%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\tan \left(\pi \cdot \ell\right) \cdot 1}{\left(-F\right) \cdot \left(-F\right)}} \]
    4. sqr-neg76.2%

      \[\leadsto \pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right) \cdot 1}{\color{blue}{F \cdot F}} \]
    5. *-rgt-identity76.2%

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\tan \left(\pi \cdot \ell\right)}}{F \cdot F} \]
  3. Simplified76.2%

    \[\leadsto \color{blue}{\pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. *-un-lft-identity76.2%

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{1 \cdot \tan \left(\pi \cdot \ell\right)}}{F \cdot F} \]
    2. associate-*l/76.0%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)} \]
    3. add-sqr-sqrt76.0%

      \[\leadsto \pi \cdot \ell - \color{blue}{\left(\sqrt{\frac{1}{F \cdot F}} \cdot \sqrt{\frac{1}{F \cdot F}}\right)} \cdot \tan \left(\pi \cdot \ell\right) \]
    4. associate-*l*75.9%

      \[\leadsto \pi \cdot \ell - \color{blue}{\sqrt{\frac{1}{F \cdot F}} \cdot \left(\sqrt{\frac{1}{F \cdot F}} \cdot \tan \left(\pi \cdot \ell\right)\right)} \]
    5. sqrt-div76.0%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\sqrt{1}}{\sqrt{F \cdot F}}} \cdot \left(\sqrt{\frac{1}{F \cdot F}} \cdot \tan \left(\pi \cdot \ell\right)\right) \]
    6. metadata-eval76.0%

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{1}}{\sqrt{F \cdot F}} \cdot \left(\sqrt{\frac{1}{F \cdot F}} \cdot \tan \left(\pi \cdot \ell\right)\right) \]
    7. sqrt-prod41.3%

      \[\leadsto \pi \cdot \ell - \frac{1}{\color{blue}{\sqrt{F} \cdot \sqrt{F}}} \cdot \left(\sqrt{\frac{1}{F \cdot F}} \cdot \tan \left(\pi \cdot \ell\right)\right) \]
    8. add-sqr-sqrt66.2%

      \[\leadsto \pi \cdot \ell - \frac{1}{\color{blue}{F}} \cdot \left(\sqrt{\frac{1}{F \cdot F}} \cdot \tan \left(\pi \cdot \ell\right)\right) \]
    9. sqrt-div66.2%

      \[\leadsto \pi \cdot \ell - \frac{1}{F} \cdot \left(\color{blue}{\frac{\sqrt{1}}{\sqrt{F \cdot F}}} \cdot \tan \left(\pi \cdot \ell\right)\right) \]
    10. metadata-eval66.2%

      \[\leadsto \pi \cdot \ell - \frac{1}{F} \cdot \left(\frac{\color{blue}{1}}{\sqrt{F \cdot F}} \cdot \tan \left(\pi \cdot \ell\right)\right) \]
    11. sqrt-prod42.4%

      \[\leadsto \pi \cdot \ell - \frac{1}{F} \cdot \left(\frac{1}{\color{blue}{\sqrt{F} \cdot \sqrt{F}}} \cdot \tan \left(\pi \cdot \ell\right)\right) \]
    12. add-sqr-sqrt81.0%

      \[\leadsto \pi \cdot \ell - \frac{1}{F} \cdot \left(\frac{1}{\color{blue}{F}} \cdot \tan \left(\pi \cdot \ell\right)\right) \]
  6. Applied egg-rr81.0%

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1}{F} \cdot \left(\frac{1}{F} \cdot \tan \left(\pi \cdot \ell\right)\right)} \]
  7. Step-by-step derivation
    1. associate-/r/81.0%

      \[\leadsto \pi \cdot \ell - \frac{1}{F} \cdot \color{blue}{\frac{1}{\frac{F}{\tan \left(\pi \cdot \ell\right)}}} \]
    2. un-div-inv81.1%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{1}{F}}{\frac{F}{\tan \left(\pi \cdot \ell\right)}}} \]
  8. Applied egg-rr81.1%

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{1}{F}}{\frac{F}{\tan \left(\pi \cdot \ell\right)}}} \]
  9. Final simplification81.1%

    \[\leadsto \pi \cdot \ell + \frac{\frac{-1}{F}}{\frac{F}{\tan \left(\pi \cdot \ell\right)}} \]
  10. Add Preprocessing

Alternative 9: 81.7% accurate, 1.0× speedup?

\[\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} \]
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}
Derivation
  1. Initial program 76.0%

    \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. associate-*l/76.2%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1 \cdot \tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
    2. *-un-lft-identity76.2%

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\tan \left(\pi \cdot \ell\right)}}{F \cdot F} \]
    3. associate-/r*81.1%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
  4. Applied egg-rr81.1%

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
  5. Add Preprocessing

Alternative 10: 74.3% accurate, 10.3× speedup?

\[\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{l\_m}{F}}{\frac{F}{\pi}}\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
 (* l_s (- (* PI l_m) (/ (/ l_m F) (/ F PI)))))
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 / F) / (F / ((double) M_PI))));
}
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 / F) / (F / Math.PI)));
}
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 / F) / (F / math.pi)))
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 / F) / Float64(F / pi))))
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 / F) / (F / pi)));
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 / F), $MachinePrecision] / N[(F / Pi), $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{l\_m}{F}}{\frac{F}{\pi}}\right)
\end{array}
Derivation
  1. Initial program 76.0%

    \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
  2. Step-by-step derivation
    1. *-commutative76.0%

      \[\leadsto \pi \cdot \ell - \color{blue}{\tan \left(\pi \cdot \ell\right) \cdot \frac{1}{F \cdot F}} \]
    2. sqr-neg76.0%

      \[\leadsto \pi \cdot \ell - \tan \left(\pi \cdot \ell\right) \cdot \frac{1}{\color{blue}{\left(-F\right) \cdot \left(-F\right)}} \]
    3. associate-*r/76.2%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\tan \left(\pi \cdot \ell\right) \cdot 1}{\left(-F\right) \cdot \left(-F\right)}} \]
    4. sqr-neg76.2%

      \[\leadsto \pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right) \cdot 1}{\color{blue}{F \cdot F}} \]
    5. *-rgt-identity76.2%

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\tan \left(\pi \cdot \ell\right)}}{F \cdot F} \]
  3. Simplified76.2%

    \[\leadsto \color{blue}{\pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
  4. Add Preprocessing
  5. Taylor expanded in l around 0 68.3%

    \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\ell \cdot \pi}}{F \cdot F} \]
  6. Step-by-step derivation
    1. *-commutative68.3%

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\pi \cdot \ell}}{F \cdot F} \]
    2. times-frac73.5%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\pi}{F} \cdot \frac{\ell}{F}} \]
  7. Applied egg-rr73.5%

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\pi}{F} \cdot \frac{\ell}{F}} \]
  8. Step-by-step derivation
    1. *-commutative73.5%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    2. clear-num73.5%

      \[\leadsto \pi \cdot \ell - \frac{\ell}{F} \cdot \color{blue}{\frac{1}{\frac{F}{\pi}}} \]
    3. un-div-inv73.6%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\ell}{F}}{\frac{F}{\pi}}} \]
  9. Applied egg-rr73.6%

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\ell}{F}}{\frac{F}{\pi}}} \]
  10. Add Preprocessing

Alternative 11: 74.3% accurate, 10.3× speedup?

\[\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}{F} \cdot \frac{\pi}{F}\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
 (* l_s (- (* PI l_m) (* (/ l_m F) (/ PI 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 / F) * (((double) M_PI) / 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 / F) * (Math.PI / 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 / F) * (math.pi / 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 / F) * Float64(pi / 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 / F) * (pi / 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 / F), $MachinePrecision] * N[(Pi / 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{l\_m}{F} \cdot \frac{\pi}{F}\right)
\end{array}
Derivation
  1. Initial program 76.0%

    \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
  2. Step-by-step derivation
    1. *-commutative76.0%

      \[\leadsto \pi \cdot \ell - \color{blue}{\tan \left(\pi \cdot \ell\right) \cdot \frac{1}{F \cdot F}} \]
    2. sqr-neg76.0%

      \[\leadsto \pi \cdot \ell - \tan \left(\pi \cdot \ell\right) \cdot \frac{1}{\color{blue}{\left(-F\right) \cdot \left(-F\right)}} \]
    3. associate-*r/76.2%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\tan \left(\pi \cdot \ell\right) \cdot 1}{\left(-F\right) \cdot \left(-F\right)}} \]
    4. sqr-neg76.2%

      \[\leadsto \pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right) \cdot 1}{\color{blue}{F \cdot F}} \]
    5. *-rgt-identity76.2%

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\tan \left(\pi \cdot \ell\right)}}{F \cdot F} \]
  3. Simplified76.2%

    \[\leadsto \color{blue}{\pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
  4. Add Preprocessing
  5. Taylor expanded in l around 0 68.3%

    \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\ell \cdot \pi}}{F \cdot F} \]
  6. Step-by-step derivation
    1. *-commutative68.3%

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\pi \cdot \ell}}{F \cdot F} \]
    2. times-frac73.5%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\pi}{F} \cdot \frac{\ell}{F}} \]
  7. Applied egg-rr73.5%

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\pi}{F} \cdot \frac{\ell}{F}} \]
  8. Final simplification73.5%

    \[\leadsto \pi \cdot \ell - \frac{\ell}{F} \cdot \frac{\pi}{F} \]
  9. Add Preprocessing

Reproduce

?
herbie shell --seed 2024137 
(FPCore (F l)
  :name "VandenBroeck and Keller, Equation (6)"
  :precision binary64
  (- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))