VandenBroeck and Keller, Equation (6)

Percentage Accurate: 75.9% → 98.3%
Time: 55.1s
Alternatives: 10
Speedup: 1.4×

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 10 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.9% 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: 98.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+20} \lor \neg \left(\pi \cdot \ell \leq 10^{-10}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell - \frac{-1}{F \cdot \frac{-F}{\tan \left(\pi \cdot \ell\right)}}\\ \end{array} \end{array} \]
(FPCore (F l)
 :precision binary64
 (if (or (<= (* PI l) -2e+20) (not (<= (* PI l) 1e-10)))
   (* PI l)
   (- (* PI l) (/ -1.0 (* F (/ (- F) (tan (* PI l))))))))
double code(double F, double l) {
	double tmp;
	if (((((double) M_PI) * l) <= -2e+20) || !((((double) M_PI) * l) <= 1e-10)) {
		tmp = ((double) M_PI) * l;
	} else {
		tmp = (((double) M_PI) * l) - (-1.0 / (F * (-F / tan((((double) M_PI) * l)))));
	}
	return tmp;
}
public static double code(double F, double l) {
	double tmp;
	if (((Math.PI * l) <= -2e+20) || !((Math.PI * l) <= 1e-10)) {
		tmp = Math.PI * l;
	} else {
		tmp = (Math.PI * l) - (-1.0 / (F * (-F / Math.tan((Math.PI * l)))));
	}
	return tmp;
}
def code(F, l):
	tmp = 0
	if ((math.pi * l) <= -2e+20) or not ((math.pi * l) <= 1e-10):
		tmp = math.pi * l
	else:
		tmp = (math.pi * l) - (-1.0 / (F * (-F / math.tan((math.pi * l)))))
	return tmp
function code(F, l)
	tmp = 0.0
	if ((Float64(pi * l) <= -2e+20) || !(Float64(pi * l) <= 1e-10))
		tmp = Float64(pi * l);
	else
		tmp = Float64(Float64(pi * l) - Float64(-1.0 / Float64(F * Float64(Float64(-F) / tan(Float64(pi * l))))));
	end
	return tmp
end
function tmp_2 = code(F, l)
	tmp = 0.0;
	if (((pi * l) <= -2e+20) || ~(((pi * l) <= 1e-10)))
		tmp = pi * l;
	else
		tmp = (pi * l) - (-1.0 / (F * (-F / tan((pi * l)))));
	end
	tmp_2 = tmp;
end
code[F_, l_] := If[Or[LessEqual[N[(Pi * l), $MachinePrecision], -2e+20], N[Not[LessEqual[N[(Pi * l), $MachinePrecision], 1e-10]], $MachinePrecision]], N[(Pi * l), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] - N[(-1.0 / N[(F * N[((-F) / N[Tan[N[(Pi * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+20} \lor \neg \left(\pi \cdot \ell \leq 10^{-10}\right):\\
\;\;\;\;\pi \cdot \ell\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (PI.f64) l) < -2e20 or 1.00000000000000004e-10 < (*.f64 (PI.f64) l)

    1. Initial program 71.3%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Taylor expanded in l around 0 56.7%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    3. Step-by-step derivation
      1. associate-/l*56.7%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{{F}^{2}}{\pi}}} \]
      2. unpow256.7%

        \[\leadsto \pi \cdot \ell - \frac{\ell}{\frac{\color{blue}{F \cdot F}}{\pi}} \]
    4. Simplified56.7%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{F \cdot F}{\pi}}} \]
    5. Taylor expanded in l around 0 56.7%

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

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    7. Simplified56.7%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    8. Taylor expanded in F around inf 99.5%

      \[\leadsto \color{blue}{\ell \cdot \pi} \]

    if -2e20 < (*.f64 (PI.f64) l) < 1.00000000000000004e-10

    1. Initial program 86.4%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Taylor expanded in F around 0 86.4%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1}{{F}^{2}}} \cdot \tan \left(\pi \cdot \ell\right) \]
    3. Step-by-step derivation
      1. unpow-186.4%

        \[\leadsto \pi \cdot \ell - \color{blue}{{\left({F}^{2}\right)}^{-1}} \cdot \tan \left(\pi \cdot \ell\right) \]
      2. exp-to-pow40.2%

        \[\leadsto \pi \cdot \ell - {\color{blue}{\left(e^{\log F \cdot 2}\right)}}^{-1} \cdot \tan \left(\pi \cdot \ell\right) \]
      3. exp-prod40.2%

        \[\leadsto \pi \cdot \ell - \color{blue}{e^{\left(\log F \cdot 2\right) \cdot -1}} \cdot \tan \left(\pi \cdot \ell\right) \]
      4. associate-*l*40.2%

        \[\leadsto \pi \cdot \ell - e^{\color{blue}{\log F \cdot \left(2 \cdot -1\right)}} \cdot \tan \left(\pi \cdot \ell\right) \]
      5. metadata-eval40.2%

        \[\leadsto \pi \cdot \ell - e^{\log F \cdot \color{blue}{-2}} \cdot \tan \left(\pi \cdot \ell\right) \]
      6. exp-to-pow86.4%

        \[\leadsto \pi \cdot \ell - \color{blue}{{F}^{-2}} \cdot \tan \left(\pi \cdot \ell\right) \]
    4. Simplified86.4%

      \[\leadsto \pi \cdot \ell - \color{blue}{{F}^{-2}} \cdot \tan \left(\pi \cdot \ell\right) \]
    5. Step-by-step derivation
      1. metadata-eval86.4%

        \[\leadsto \pi \cdot \ell - {F}^{\color{blue}{\left(-2\right)}} \cdot \tan \left(\pi \cdot \ell\right) \]
      2. pow-flip86.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+20} \lor \neg \left(\pi \cdot \ell \leq 10^{-10}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell - \frac{-1}{F \cdot \frac{-F}{\tan \left(\pi \cdot \ell\right)}}\\ \end{array} \]

Alternative 2: 95.4% accurate, 0.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\pi}^{5} \cdot -0.03333333333333333\\ t_1 := {\pi}^{3} \cdot 0.3333333333333333\\ t_2 := t_1 \cdot \left(-0.5 \cdot {\pi}^{2}\right)\\ t_3 := t_0 - t_2\\ t_4 := \frac{F}{\frac{{\pi}^{2}}{t_3}} - \frac{F}{\frac{{\pi}^{3}}{{t_1}^{2}}}\\ \pi \cdot \ell - \frac{-1}{F \cdot \left(\frac{F}{\frac{{\pi}^{2}}{{\pi}^{3} \cdot \left(\ell \cdot 0.3333333333333333\right)}} - \mathsf{fma}\left(-1, \mathsf{fma}\left(\left(\frac{-0.0001984126984126984 \cdot {\pi}^{7} - \mathsf{fma}\left(0.041666666666666664, {\pi}^{3} \cdot \left(0.3333333333333333 \cdot {\pi}^{4}\right), \mathsf{fma}\left(-0.5, {\pi}^{2} \cdot t_3, {\pi}^{7} \cdot -0.001388888888888889\right)\right)}{\frac{{\pi}^{2}}{F}} - \frac{t_1}{\frac{\pi}{t_4}}\right) + \frac{\left(F \cdot t_1\right) \cdot \left(t_2 - t_0\right)}{{\pi}^{3}}, {\ell}^{5}, t_4 \cdot {\ell}^{3}\right), \frac{F}{\pi \cdot \ell}\right)\right)} \end{array} \end{array} \]
(FPCore (F l)
 :precision binary64
 (let* ((t_0 (* (pow PI 5.0) -0.03333333333333333))
        (t_1 (* (pow PI 3.0) 0.3333333333333333))
        (t_2 (* t_1 (* -0.5 (pow PI 2.0))))
        (t_3 (- t_0 t_2))
        (t_4
         (- (/ F (/ (pow PI 2.0) t_3)) (/ F (/ (pow PI 3.0) (pow t_1 2.0))))))
   (-
    (* PI l)
    (/
     -1.0
     (*
      F
      (-
       (/ F (/ (pow PI 2.0) (* (pow PI 3.0) (* l 0.3333333333333333))))
       (fma
        -1.0
        (fma
         (+
          (-
           (/
            (-
             (* -0.0001984126984126984 (pow PI 7.0))
             (fma
              0.041666666666666664
              (* (pow PI 3.0) (* 0.3333333333333333 (pow PI 4.0)))
              (fma
               -0.5
               (* (pow PI 2.0) t_3)
               (* (pow PI 7.0) -0.001388888888888889))))
            (/ (pow PI 2.0) F))
           (/ t_1 (/ PI t_4)))
          (/ (* (* F t_1) (- t_2 t_0)) (pow PI 3.0)))
         (pow l 5.0)
         (* t_4 (pow l 3.0)))
        (/ F (* PI l)))))))))
double code(double F, double l) {
	double t_0 = pow(((double) M_PI), 5.0) * -0.03333333333333333;
	double t_1 = pow(((double) M_PI), 3.0) * 0.3333333333333333;
	double t_2 = t_1 * (-0.5 * pow(((double) M_PI), 2.0));
	double t_3 = t_0 - t_2;
	double t_4 = (F / (pow(((double) M_PI), 2.0) / t_3)) - (F / (pow(((double) M_PI), 3.0) / pow(t_1, 2.0)));
	return (((double) M_PI) * l) - (-1.0 / (F * ((F / (pow(((double) M_PI), 2.0) / (pow(((double) M_PI), 3.0) * (l * 0.3333333333333333)))) - fma(-1.0, fma((((((-0.0001984126984126984 * pow(((double) M_PI), 7.0)) - fma(0.041666666666666664, (pow(((double) M_PI), 3.0) * (0.3333333333333333 * pow(((double) M_PI), 4.0))), fma(-0.5, (pow(((double) M_PI), 2.0) * t_3), (pow(((double) M_PI), 7.0) * -0.001388888888888889)))) / (pow(((double) M_PI), 2.0) / F)) - (t_1 / (((double) M_PI) / t_4))) + (((F * t_1) * (t_2 - t_0)) / pow(((double) M_PI), 3.0))), pow(l, 5.0), (t_4 * pow(l, 3.0))), (F / (((double) M_PI) * l))))));
}
function code(F, l)
	t_0 = Float64((pi ^ 5.0) * -0.03333333333333333)
	t_1 = Float64((pi ^ 3.0) * 0.3333333333333333)
	t_2 = Float64(t_1 * Float64(-0.5 * (pi ^ 2.0)))
	t_3 = Float64(t_0 - t_2)
	t_4 = Float64(Float64(F / Float64((pi ^ 2.0) / t_3)) - Float64(F / Float64((pi ^ 3.0) / (t_1 ^ 2.0))))
	return Float64(Float64(pi * l) - Float64(-1.0 / Float64(F * Float64(Float64(F / Float64((pi ^ 2.0) / Float64((pi ^ 3.0) * Float64(l * 0.3333333333333333)))) - fma(-1.0, fma(Float64(Float64(Float64(Float64(Float64(-0.0001984126984126984 * (pi ^ 7.0)) - fma(0.041666666666666664, Float64((pi ^ 3.0) * Float64(0.3333333333333333 * (pi ^ 4.0))), fma(-0.5, Float64((pi ^ 2.0) * t_3), Float64((pi ^ 7.0) * -0.001388888888888889)))) / Float64((pi ^ 2.0) / F)) - Float64(t_1 / Float64(pi / t_4))) + Float64(Float64(Float64(F * t_1) * Float64(t_2 - t_0)) / (pi ^ 3.0))), (l ^ 5.0), Float64(t_4 * (l ^ 3.0))), Float64(F / Float64(pi * l)))))))
end
code[F_, l_] := Block[{t$95$0 = N[(N[Power[Pi, 5.0], $MachinePrecision] * -0.03333333333333333), $MachinePrecision]}, Block[{t$95$1 = N[(N[Power[Pi, 3.0], $MachinePrecision] * 0.3333333333333333), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(-0.5 * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$0 - t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(F / N[(N[Power[Pi, 2.0], $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision] - N[(F / N[(N[Power[Pi, 3.0], $MachinePrecision] / N[Power[t$95$1, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(N[(Pi * l), $MachinePrecision] - N[(-1.0 / N[(F * N[(N[(F / N[(N[Power[Pi, 2.0], $MachinePrecision] / N[(N[Power[Pi, 3.0], $MachinePrecision] * N[(l * 0.3333333333333333), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1.0 * N[(N[(N[(N[(N[(N[(-0.0001984126984126984 * N[Power[Pi, 7.0], $MachinePrecision]), $MachinePrecision] - N[(0.041666666666666664 * N[(N[Power[Pi, 3.0], $MachinePrecision] * N[(0.3333333333333333 * N[Power[Pi, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * N[(N[Power[Pi, 2.0], $MachinePrecision] * t$95$3), $MachinePrecision] + N[(N[Power[Pi, 7.0], $MachinePrecision] * -0.001388888888888889), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[Power[Pi, 2.0], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision] - N[(t$95$1 / N[(Pi / t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(F * t$95$1), $MachinePrecision] * N[(t$95$2 - t$95$0), $MachinePrecision]), $MachinePrecision] / N[Power[Pi, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[Power[l, 5.0], $MachinePrecision] + N[(t$95$4 * N[Power[l, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F / N[(Pi * l), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\pi}^{5} \cdot -0.03333333333333333\\
t_1 := {\pi}^{3} \cdot 0.3333333333333333\\
t_2 := t_1 \cdot \left(-0.5 \cdot {\pi}^{2}\right)\\
t_3 := t_0 - t_2\\
t_4 := \frac{F}{\frac{{\pi}^{2}}{t_3}} - \frac{F}{\frac{{\pi}^{3}}{{t_1}^{2}}}\\
\pi \cdot \ell - \frac{-1}{F \cdot \left(\frac{F}{\frac{{\pi}^{2}}{{\pi}^{3} \cdot \left(\ell \cdot 0.3333333333333333\right)}} - \mathsf{fma}\left(-1, \mathsf{fma}\left(\left(\frac{-0.0001984126984126984 \cdot {\pi}^{7} - \mathsf{fma}\left(0.041666666666666664, {\pi}^{3} \cdot \left(0.3333333333333333 \cdot {\pi}^{4}\right), \mathsf{fma}\left(-0.5, {\pi}^{2} \cdot t_3, {\pi}^{7} \cdot -0.001388888888888889\right)\right)}{\frac{{\pi}^{2}}{F}} - \frac{t_1}{\frac{\pi}{t_4}}\right) + \frac{\left(F \cdot t_1\right) \cdot \left(t_2 - t_0\right)}{{\pi}^{3}}, {\ell}^{5}, t_4 \cdot {\ell}^{3}\right), \frac{F}{\pi \cdot \ell}\right)\right)}
\end{array}
\end{array}
Derivation
  1. Initial program 79.5%

    \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
  2. Taylor expanded in F around 0 79.5%

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1}{{F}^{2}}} \cdot \tan \left(\pi \cdot \ell\right) \]
  3. Step-by-step derivation
    1. unpow-179.5%

      \[\leadsto \pi \cdot \ell - \color{blue}{{\left({F}^{2}\right)}^{-1}} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. exp-to-pow37.1%

      \[\leadsto \pi \cdot \ell - {\color{blue}{\left(e^{\log F \cdot 2}\right)}}^{-1} \cdot \tan \left(\pi \cdot \ell\right) \]
    3. exp-prod37.1%

      \[\leadsto \pi \cdot \ell - \color{blue}{e^{\left(\log F \cdot 2\right) \cdot -1}} \cdot \tan \left(\pi \cdot \ell\right) \]
    4. associate-*l*37.1%

      \[\leadsto \pi \cdot \ell - e^{\color{blue}{\log F \cdot \left(2 \cdot -1\right)}} \cdot \tan \left(\pi \cdot \ell\right) \]
    5. metadata-eval37.1%

      \[\leadsto \pi \cdot \ell - e^{\log F \cdot \color{blue}{-2}} \cdot \tan \left(\pi \cdot \ell\right) \]
    6. exp-to-pow79.4%

      \[\leadsto \pi \cdot \ell - \color{blue}{{F}^{-2}} \cdot \tan \left(\pi \cdot \ell\right) \]
  4. Simplified79.4%

    \[\leadsto \pi \cdot \ell - \color{blue}{{F}^{-2}} \cdot \tan \left(\pi \cdot \ell\right) \]
  5. Step-by-step derivation
    1. metadata-eval79.4%

      \[\leadsto \pi \cdot \ell - {F}^{\color{blue}{\left(-2\right)}} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. pow-flip79.5%

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

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

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

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

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

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

      \[\leadsto \pi \cdot \ell - \frac{-1}{-\color{blue}{F \cdot \frac{F}{\tan \left(\pi \cdot \ell\right)}}} \]
    9. distribute-lft-neg-in86.4%

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

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

    \[\leadsto \pi \cdot \ell - \frac{-1}{\left(-F\right) \cdot \color{blue}{\left(-1 \cdot \frac{F \cdot \left(\ell \cdot \left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right)\right)}{{\pi}^{2}} + \left(\frac{F}{\ell \cdot \pi} + \left(-1 \cdot \left(\left(\frac{\left(-0.0001984126984126984 \cdot {\pi}^{7} - \left(0.041666666666666664 \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot {\pi}^{4}\right) + \left(-0.001388888888888889 \cdot {\pi}^{7} + -0.5 \cdot \left(\left(0.008333333333333333 \cdot {\pi}^{5} - \left(0.041666666666666664 \cdot {\pi}^{5} + -0.5 \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot {\pi}^{2}\right)\right)\right) \cdot {\pi}^{2}\right)\right)\right)\right) \cdot F}{{\pi}^{2}} + \left(-1 \cdot \frac{\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot \left(-1 \cdot \frac{F \cdot {\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right)}^{2}}{{\pi}^{3}} + \frac{F \cdot \left(0.008333333333333333 \cdot {\pi}^{5} - \left(0.041666666666666664 \cdot {\pi}^{5} + -0.5 \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot {\pi}^{2}\right)\right)\right)}{{\pi}^{2}}\right)}{\pi} + -1 \cdot \frac{F \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot \left(0.008333333333333333 \cdot {\pi}^{5} - \left(0.041666666666666664 \cdot {\pi}^{5} + -0.5 \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot {\pi}^{2}\right)\right)\right)\right)}{{\pi}^{3}}\right)\right) \cdot {\ell}^{5}\right) + -1 \cdot \left({\ell}^{3} \cdot \left(-1 \cdot \frac{F \cdot {\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right)}^{2}}{{\pi}^{3}} + \frac{F \cdot \left(0.008333333333333333 \cdot {\pi}^{5} - \left(0.041666666666666664 \cdot {\pi}^{5} + -0.5 \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot {\pi}^{2}\right)\right)\right)}{{\pi}^{2}}\right)\right)\right)\right)\right)}} \]
  8. Simplified97.0%

    \[\leadsto \pi \cdot \ell - \frac{-1}{\left(-F\right) \cdot \color{blue}{\left(\mathsf{fma}\left(-1, \mathsf{fma}\left(\left(\frac{-0.0001984126984126984 \cdot {\pi}^{7} - \mathsf{fma}\left(0.041666666666666664, {\pi}^{3} \cdot \left(0.3333333333333333 \cdot {\pi}^{4}\right), \mathsf{fma}\left(-0.5, {\pi}^{2} \cdot \left({\pi}^{5} \cdot -0.03333333333333333 - \left({\pi}^{3} \cdot 0.3333333333333333\right) \cdot \left({\pi}^{2} \cdot -0.5\right)\right), {\pi}^{7} \cdot -0.001388888888888889\right)\right)}{\frac{{\pi}^{2}}{F}} - \frac{{\pi}^{3} \cdot 0.3333333333333333}{\frac{\pi}{\frac{F}{\frac{{\pi}^{2}}{{\pi}^{5} \cdot -0.03333333333333333 - \left({\pi}^{3} \cdot 0.3333333333333333\right) \cdot \left({\pi}^{2} \cdot -0.5\right)}} - \frac{F}{\frac{{\pi}^{3}}{{\left({\pi}^{3} \cdot 0.3333333333333333\right)}^{2}}}}}\right) - \frac{\left({\pi}^{5} \cdot -0.03333333333333333 - \left({\pi}^{3} \cdot 0.3333333333333333\right) \cdot \left({\pi}^{2} \cdot -0.5\right)\right) \cdot \left(\left({\pi}^{3} \cdot 0.3333333333333333\right) \cdot F\right)}{{\pi}^{3}}, {\ell}^{5}, {\ell}^{3} \cdot \left(\frac{F}{\frac{{\pi}^{2}}{{\pi}^{5} \cdot -0.03333333333333333 - \left({\pi}^{3} \cdot 0.3333333333333333\right) \cdot \left({\pi}^{2} \cdot -0.5\right)}} - \frac{F}{\frac{{\pi}^{3}}{{\left({\pi}^{3} \cdot 0.3333333333333333\right)}^{2}}}\right)\right), \frac{F}{\ell \cdot \pi}\right) - \frac{F}{\frac{{\pi}^{2}}{{\pi}^{3} \cdot \left(0.3333333333333333 \cdot \ell\right)}}\right)}} \]
  9. Final simplification97.0%

    \[\leadsto \pi \cdot \ell - \frac{-1}{F \cdot \left(\frac{F}{\frac{{\pi}^{2}}{{\pi}^{3} \cdot \left(\ell \cdot 0.3333333333333333\right)}} - \mathsf{fma}\left(-1, \mathsf{fma}\left(\left(\frac{-0.0001984126984126984 \cdot {\pi}^{7} - \mathsf{fma}\left(0.041666666666666664, {\pi}^{3} \cdot \left(0.3333333333333333 \cdot {\pi}^{4}\right), \mathsf{fma}\left(-0.5, {\pi}^{2} \cdot \left({\pi}^{5} \cdot -0.03333333333333333 - \left({\pi}^{3} \cdot 0.3333333333333333\right) \cdot \left(-0.5 \cdot {\pi}^{2}\right)\right), {\pi}^{7} \cdot -0.001388888888888889\right)\right)}{\frac{{\pi}^{2}}{F}} - \frac{{\pi}^{3} \cdot 0.3333333333333333}{\frac{\pi}{\frac{F}{\frac{{\pi}^{2}}{{\pi}^{5} \cdot -0.03333333333333333 - \left({\pi}^{3} \cdot 0.3333333333333333\right) \cdot \left(-0.5 \cdot {\pi}^{2}\right)}} - \frac{F}{\frac{{\pi}^{3}}{{\left({\pi}^{3} \cdot 0.3333333333333333\right)}^{2}}}}}\right) + \frac{\left(F \cdot \left({\pi}^{3} \cdot 0.3333333333333333\right)\right) \cdot \left(\left({\pi}^{3} \cdot 0.3333333333333333\right) \cdot \left(-0.5 \cdot {\pi}^{2}\right) - {\pi}^{5} \cdot -0.03333333333333333\right)}{{\pi}^{3}}, {\ell}^{5}, \left(\frac{F}{\frac{{\pi}^{2}}{{\pi}^{5} \cdot -0.03333333333333333 - \left({\pi}^{3} \cdot 0.3333333333333333\right) \cdot \left(-0.5 \cdot {\pi}^{2}\right)}} - \frac{F}{\frac{{\pi}^{3}}{{\left({\pi}^{3} \cdot 0.3333333333333333\right)}^{2}}}\right) \cdot {\ell}^{3}\right), \frac{F}{\pi \cdot \ell}\right)\right)} \]

Alternative 3: 98.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+20} \lor \neg \left(\pi \cdot \ell \leq 10^{-10}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell + \frac{-1}{\frac{F}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}}\\ \end{array} \end{array} \]
(FPCore (F l)
 :precision binary64
 (if (or (<= (* PI l) -2e+20) (not (<= (* PI l) 1e-10)))
   (* PI l)
   (+ (* PI l) (/ -1.0 (/ F (/ (tan (* PI l)) F))))))
double code(double F, double l) {
	double tmp;
	if (((((double) M_PI) * l) <= -2e+20) || !((((double) M_PI) * l) <= 1e-10)) {
		tmp = ((double) M_PI) * l;
	} else {
		tmp = (((double) M_PI) * l) + (-1.0 / (F / (tan((((double) M_PI) * l)) / F)));
	}
	return tmp;
}
public static double code(double F, double l) {
	double tmp;
	if (((Math.PI * l) <= -2e+20) || !((Math.PI * l) <= 1e-10)) {
		tmp = Math.PI * l;
	} else {
		tmp = (Math.PI * l) + (-1.0 / (F / (Math.tan((Math.PI * l)) / F)));
	}
	return tmp;
}
def code(F, l):
	tmp = 0
	if ((math.pi * l) <= -2e+20) or not ((math.pi * l) <= 1e-10):
		tmp = math.pi * l
	else:
		tmp = (math.pi * l) + (-1.0 / (F / (math.tan((math.pi * l)) / F)))
	return tmp
function code(F, l)
	tmp = 0.0
	if ((Float64(pi * l) <= -2e+20) || !(Float64(pi * l) <= 1e-10))
		tmp = Float64(pi * l);
	else
		tmp = Float64(Float64(pi * l) + Float64(-1.0 / Float64(F / Float64(tan(Float64(pi * l)) / F))));
	end
	return tmp
end
function tmp_2 = code(F, l)
	tmp = 0.0;
	if (((pi * l) <= -2e+20) || ~(((pi * l) <= 1e-10)))
		tmp = pi * l;
	else
		tmp = (pi * l) + (-1.0 / (F / (tan((pi * l)) / F)));
	end
	tmp_2 = tmp;
end
code[F_, l_] := If[Or[LessEqual[N[(Pi * l), $MachinePrecision], -2e+20], N[Not[LessEqual[N[(Pi * l), $MachinePrecision], 1e-10]], $MachinePrecision]], N[(Pi * l), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] + N[(-1.0 / N[(F / N[(N[Tan[N[(Pi * l), $MachinePrecision]], $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+20} \lor \neg \left(\pi \cdot \ell \leq 10^{-10}\right):\\
\;\;\;\;\pi \cdot \ell\\

\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell + \frac{-1}{\frac{F}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (PI.f64) l) < -2e20 or 1.00000000000000004e-10 < (*.f64 (PI.f64) l)

    1. Initial program 71.3%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Taylor expanded in l around 0 56.7%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    3. Step-by-step derivation
      1. associate-/l*56.7%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{{F}^{2}}{\pi}}} \]
      2. unpow256.7%

        \[\leadsto \pi \cdot \ell - \frac{\ell}{\frac{\color{blue}{F \cdot F}}{\pi}} \]
    4. Simplified56.7%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{F \cdot F}{\pi}}} \]
    5. Taylor expanded in l around 0 56.7%

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

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    7. Simplified56.7%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    8. Taylor expanded in F around inf 99.5%

      \[\leadsto \color{blue}{\ell \cdot \pi} \]

    if -2e20 < (*.f64 (PI.f64) l) < 1.00000000000000004e-10

    1. Initial program 86.4%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+20} \lor \neg \left(\pi \cdot \ell \leq 10^{-10}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell + \frac{-1}{\frac{F}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}}\\ \end{array} \]

Alternative 4: 98.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+20} \lor \neg \left(\pi \cdot \ell \leq 10^{-10}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell + \frac{\frac{-1}{F}}{\frac{F}{\tan \left(\pi \cdot \ell\right)}}\\ \end{array} \end{array} \]
(FPCore (F l)
 :precision binary64
 (if (or (<= (* PI l) -2e+20) (not (<= (* PI l) 1e-10)))
   (* PI l)
   (+ (* PI l) (/ (/ -1.0 F) (/ F (tan (* PI l)))))))
double code(double F, double l) {
	double tmp;
	if (((((double) M_PI) * l) <= -2e+20) || !((((double) M_PI) * l) <= 1e-10)) {
		tmp = ((double) M_PI) * l;
	} else {
		tmp = (((double) M_PI) * l) + ((-1.0 / F) / (F / tan((((double) M_PI) * l))));
	}
	return tmp;
}
public static double code(double F, double l) {
	double tmp;
	if (((Math.PI * l) <= -2e+20) || !((Math.PI * l) <= 1e-10)) {
		tmp = Math.PI * l;
	} else {
		tmp = (Math.PI * l) + ((-1.0 / F) / (F / Math.tan((Math.PI * l))));
	}
	return tmp;
}
def code(F, l):
	tmp = 0
	if ((math.pi * l) <= -2e+20) or not ((math.pi * l) <= 1e-10):
		tmp = math.pi * l
	else:
		tmp = (math.pi * l) + ((-1.0 / F) / (F / math.tan((math.pi * l))))
	return tmp
function code(F, l)
	tmp = 0.0
	if ((Float64(pi * l) <= -2e+20) || !(Float64(pi * l) <= 1e-10))
		tmp = Float64(pi * l);
	else
		tmp = Float64(Float64(pi * l) + Float64(Float64(-1.0 / F) / Float64(F / tan(Float64(pi * l)))));
	end
	return tmp
end
function tmp_2 = code(F, l)
	tmp = 0.0;
	if (((pi * l) <= -2e+20) || ~(((pi * l) <= 1e-10)))
		tmp = pi * l;
	else
		tmp = (pi * l) + ((-1.0 / F) / (F / tan((pi * l))));
	end
	tmp_2 = tmp;
end
code[F_, l_] := If[Or[LessEqual[N[(Pi * l), $MachinePrecision], -2e+20], N[Not[LessEqual[N[(Pi * l), $MachinePrecision], 1e-10]], $MachinePrecision]], N[(Pi * l), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] + N[(N[(-1.0 / F), $MachinePrecision] / N[(F / N[Tan[N[(Pi * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+20} \lor \neg \left(\pi \cdot \ell \leq 10^{-10}\right):\\
\;\;\;\;\pi \cdot \ell\\

\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell + \frac{\frac{-1}{F}}{\frac{F}{\tan \left(\pi \cdot \ell\right)}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (PI.f64) l) < -2e20 or 1.00000000000000004e-10 < (*.f64 (PI.f64) l)

    1. Initial program 71.3%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Taylor expanded in l around 0 56.7%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    3. Step-by-step derivation
      1. associate-/l*56.7%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{{F}^{2}}{\pi}}} \]
      2. unpow256.7%

        \[\leadsto \pi \cdot \ell - \frac{\ell}{\frac{\color{blue}{F \cdot F}}{\pi}} \]
    4. Simplified56.7%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{F \cdot F}{\pi}}} \]
    5. Taylor expanded in l around 0 56.7%

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

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    7. Simplified56.7%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    8. Taylor expanded in F around inf 99.5%

      \[\leadsto \color{blue}{\ell \cdot \pi} \]

    if -2e20 < (*.f64 (PI.f64) l) < 1.00000000000000004e-10

    1. Initial program 86.4%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Taylor expanded in F around 0 86.4%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1}{{F}^{2}}} \cdot \tan \left(\pi \cdot \ell\right) \]
    3. Step-by-step derivation
      1. unpow-186.4%

        \[\leadsto \pi \cdot \ell - \color{blue}{{\left({F}^{2}\right)}^{-1}} \cdot \tan \left(\pi \cdot \ell\right) \]
      2. exp-to-pow40.2%

        \[\leadsto \pi \cdot \ell - {\color{blue}{\left(e^{\log F \cdot 2}\right)}}^{-1} \cdot \tan \left(\pi \cdot \ell\right) \]
      3. exp-prod40.2%

        \[\leadsto \pi \cdot \ell - \color{blue}{e^{\left(\log F \cdot 2\right) \cdot -1}} \cdot \tan \left(\pi \cdot \ell\right) \]
      4. associate-*l*40.2%

        \[\leadsto \pi \cdot \ell - e^{\color{blue}{\log F \cdot \left(2 \cdot -1\right)}} \cdot \tan \left(\pi \cdot \ell\right) \]
      5. metadata-eval40.2%

        \[\leadsto \pi \cdot \ell - e^{\log F \cdot \color{blue}{-2}} \cdot \tan \left(\pi \cdot \ell\right) \]
      6. exp-to-pow86.4%

        \[\leadsto \pi \cdot \ell - \color{blue}{{F}^{-2}} \cdot \tan \left(\pi \cdot \ell\right) \]
    4. Simplified86.4%

      \[\leadsto \pi \cdot \ell - \color{blue}{{F}^{-2}} \cdot \tan \left(\pi \cdot \ell\right) \]
    5. Step-by-step derivation
      1. metadata-eval86.4%

        \[\leadsto \pi \cdot \ell - {F}^{\color{blue}{\left(-1 + -1\right)}} \cdot \tan \left(\pi \cdot \ell\right) \]
      2. pow-prod-up86.4%

        \[\leadsto \pi \cdot \ell - \color{blue}{\left({F}^{-1} \cdot {F}^{-1}\right)} \cdot \tan \left(\pi \cdot \ell\right) \]
      3. inv-pow86.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+20} \lor \neg \left(\pi \cdot \ell \leq 10^{-10}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell + \frac{\frac{-1}{F}}{\frac{F}{\tan \left(\pi \cdot \ell\right)}}\\ \end{array} \]

Alternative 5: 98.3% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+20} \lor \neg \left(\pi \cdot \ell \leq 10^{-10}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell - \frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}\\ \end{array} \end{array} \]
(FPCore (F l)
 :precision binary64
 (if (or (<= (* PI l) -2e+20) (not (<= (* PI l) 1e-10)))
   (* PI l)
   (- (* PI l) (/ (/ (tan (* PI l)) F) F))))
double code(double F, double l) {
	double tmp;
	if (((((double) M_PI) * l) <= -2e+20) || !((((double) M_PI) * l) <= 1e-10)) {
		tmp = ((double) M_PI) * l;
	} else {
		tmp = (((double) M_PI) * l) - ((tan((((double) M_PI) * l)) / F) / F);
	}
	return tmp;
}
public static double code(double F, double l) {
	double tmp;
	if (((Math.PI * l) <= -2e+20) || !((Math.PI * l) <= 1e-10)) {
		tmp = Math.PI * l;
	} else {
		tmp = (Math.PI * l) - ((Math.tan((Math.PI * l)) / F) / F);
	}
	return tmp;
}
def code(F, l):
	tmp = 0
	if ((math.pi * l) <= -2e+20) or not ((math.pi * l) <= 1e-10):
		tmp = math.pi * l
	else:
		tmp = (math.pi * l) - ((math.tan((math.pi * l)) / F) / F)
	return tmp
function code(F, l)
	tmp = 0.0
	if ((Float64(pi * l) <= -2e+20) || !(Float64(pi * l) <= 1e-10))
		tmp = Float64(pi * l);
	else
		tmp = Float64(Float64(pi * l) - Float64(Float64(tan(Float64(pi * l)) / F) / F));
	end
	return tmp
end
function tmp_2 = code(F, l)
	tmp = 0.0;
	if (((pi * l) <= -2e+20) || ~(((pi * l) <= 1e-10)))
		tmp = pi * l;
	else
		tmp = (pi * l) - ((tan((pi * l)) / F) / F);
	end
	tmp_2 = tmp;
end
code[F_, l_] := If[Or[LessEqual[N[(Pi * l), $MachinePrecision], -2e+20], N[Not[LessEqual[N[(Pi * l), $MachinePrecision], 1e-10]], $MachinePrecision]], N[(Pi * l), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] - N[(N[(N[Tan[N[(Pi * l), $MachinePrecision]], $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+20} \lor \neg \left(\pi \cdot \ell \leq 10^{-10}\right):\\
\;\;\;\;\pi \cdot \ell\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (PI.f64) l) < -2e20 or 1.00000000000000004e-10 < (*.f64 (PI.f64) l)

    1. Initial program 71.3%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Taylor expanded in l around 0 56.7%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    3. Step-by-step derivation
      1. associate-/l*56.7%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{{F}^{2}}{\pi}}} \]
      2. unpow256.7%

        \[\leadsto \pi \cdot \ell - \frac{\ell}{\frac{\color{blue}{F \cdot F}}{\pi}} \]
    4. Simplified56.7%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{F \cdot F}{\pi}}} \]
    5. Taylor expanded in l around 0 56.7%

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

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    7. Simplified56.7%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    8. Taylor expanded in F around inf 99.5%

      \[\leadsto \color{blue}{\ell \cdot \pi} \]

    if -2e20 < (*.f64 (PI.f64) l) < 1.00000000000000004e-10

    1. Initial program 86.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+20} \lor \neg \left(\pi \cdot \ell \leq 10^{-10}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell - \frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}\\ \end{array} \]

Alternative 6: 98.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -5 \lor \neg \left(\pi \cdot \ell \leq 10^{-10}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell - \frac{\ell}{F} \cdot \frac{\pi}{F}\\ \end{array} \end{array} \]
(FPCore (F l)
 :precision binary64
 (if (or (<= (* PI l) -5.0) (not (<= (* PI l) 1e-10)))
   (* PI l)
   (- (* PI l) (* (/ l F) (/ PI F)))))
double code(double F, double l) {
	double tmp;
	if (((((double) M_PI) * l) <= -5.0) || !((((double) M_PI) * l) <= 1e-10)) {
		tmp = ((double) M_PI) * l;
	} else {
		tmp = (((double) M_PI) * l) - ((l / F) * (((double) M_PI) / F));
	}
	return tmp;
}
public static double code(double F, double l) {
	double tmp;
	if (((Math.PI * l) <= -5.0) || !((Math.PI * l) <= 1e-10)) {
		tmp = Math.PI * l;
	} else {
		tmp = (Math.PI * l) - ((l / F) * (Math.PI / F));
	}
	return tmp;
}
def code(F, l):
	tmp = 0
	if ((math.pi * l) <= -5.0) or not ((math.pi * l) <= 1e-10):
		tmp = math.pi * l
	else:
		tmp = (math.pi * l) - ((l / F) * (math.pi / F))
	return tmp
function code(F, l)
	tmp = 0.0
	if ((Float64(pi * l) <= -5.0) || !(Float64(pi * l) <= 1e-10))
		tmp = Float64(pi * l);
	else
		tmp = Float64(Float64(pi * l) - Float64(Float64(l / F) * Float64(pi / F)));
	end
	return tmp
end
function tmp_2 = code(F, l)
	tmp = 0.0;
	if (((pi * l) <= -5.0) || ~(((pi * l) <= 1e-10)))
		tmp = pi * l;
	else
		tmp = (pi * l) - ((l / F) * (pi / F));
	end
	tmp_2 = tmp;
end
code[F_, l_] := If[Or[LessEqual[N[(Pi * l), $MachinePrecision], -5.0], N[Not[LessEqual[N[(Pi * l), $MachinePrecision], 1e-10]], $MachinePrecision]], N[(Pi * l), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] - N[(N[(l / F), $MachinePrecision] * N[(Pi / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \leq -5 \lor \neg \left(\pi \cdot \ell \leq 10^{-10}\right):\\
\;\;\;\;\pi \cdot \ell\\

\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell - \frac{\ell}{F} \cdot \frac{\pi}{F}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (PI.f64) l) < -5 or 1.00000000000000004e-10 < (*.f64 (PI.f64) l)

    1. Initial program 71.6%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Taylor expanded in l around 0 56.2%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    3. Step-by-step derivation
      1. associate-/l*56.2%

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

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

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{F \cdot F}{\pi}}} \]
    5. Taylor expanded in l around 0 56.2%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    6. Step-by-step derivation
      1. unpow256.2%

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

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

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    8. Taylor expanded in F around inf 98.0%

      \[\leadsto \color{blue}{\ell \cdot \pi} \]

    if -5 < (*.f64 (PI.f64) l) < 1.00000000000000004e-10

    1. Initial program 86.5%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Taylor expanded in l around 0 87.1%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    3. Step-by-step derivation
      1. associate-/l*87.1%

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

        \[\leadsto \pi \cdot \ell - \frac{\ell}{\frac{\color{blue}{F \cdot F}}{\pi}} \]
    4. Simplified87.1%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{F \cdot F}{\pi}}} \]
    5. Taylor expanded in l around 0 87.1%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    6. Step-by-step derivation
      1. unpow287.1%

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    7. Simplified99.6%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification98.8%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -5 \lor \neg \left(\pi \cdot \ell \leq 10^{-10}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell - \frac{\ell}{F} \cdot \frac{\pi}{F}\\ \end{array} \]

Alternative 7: 90.8% accurate, 1.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \ell \cdot \left(\pi - \frac{\pi}{F \cdot F}\right)\\ \mathbf{if}\;\ell \leq -0.5:\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{elif}\;\ell \leq 5.1 \cdot 10^{-220}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;\ell \leq 2.5 \cdot 10^{-145}:\\ \;\;\;\;\frac{\pi}{F} \cdot \frac{-\ell}{F}\\ \mathbf{elif}\;\ell \leq 0.5:\\ \;\;\;\;t_0\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell\\ \end{array} \end{array} \]
(FPCore (F l)
 :precision binary64
 (let* ((t_0 (* l (- PI (/ PI (* F F))))))
   (if (<= l -0.5)
     (* PI l)
     (if (<= l 5.1e-220)
       t_0
       (if (<= l 2.5e-145)
         (* (/ PI F) (/ (- l) F))
         (if (<= l 0.5) t_0 (* PI l)))))))
double code(double F, double l) {
	double t_0 = l * (((double) M_PI) - (((double) M_PI) / (F * F)));
	double tmp;
	if (l <= -0.5) {
		tmp = ((double) M_PI) * l;
	} else if (l <= 5.1e-220) {
		tmp = t_0;
	} else if (l <= 2.5e-145) {
		tmp = (((double) M_PI) / F) * (-l / F);
	} else if (l <= 0.5) {
		tmp = t_0;
	} else {
		tmp = ((double) M_PI) * l;
	}
	return tmp;
}
public static double code(double F, double l) {
	double t_0 = l * (Math.PI - (Math.PI / (F * F)));
	double tmp;
	if (l <= -0.5) {
		tmp = Math.PI * l;
	} else if (l <= 5.1e-220) {
		tmp = t_0;
	} else if (l <= 2.5e-145) {
		tmp = (Math.PI / F) * (-l / F);
	} else if (l <= 0.5) {
		tmp = t_0;
	} else {
		tmp = Math.PI * l;
	}
	return tmp;
}
def code(F, l):
	t_0 = l * (math.pi - (math.pi / (F * F)))
	tmp = 0
	if l <= -0.5:
		tmp = math.pi * l
	elif l <= 5.1e-220:
		tmp = t_0
	elif l <= 2.5e-145:
		tmp = (math.pi / F) * (-l / F)
	elif l <= 0.5:
		tmp = t_0
	else:
		tmp = math.pi * l
	return tmp
function code(F, l)
	t_0 = Float64(l * Float64(pi - Float64(pi / Float64(F * F))))
	tmp = 0.0
	if (l <= -0.5)
		tmp = Float64(pi * l);
	elseif (l <= 5.1e-220)
		tmp = t_0;
	elseif (l <= 2.5e-145)
		tmp = Float64(Float64(pi / F) * Float64(Float64(-l) / F));
	elseif (l <= 0.5)
		tmp = t_0;
	else
		tmp = Float64(pi * l);
	end
	return tmp
end
function tmp_2 = code(F, l)
	t_0 = l * (pi - (pi / (F * F)));
	tmp = 0.0;
	if (l <= -0.5)
		tmp = pi * l;
	elseif (l <= 5.1e-220)
		tmp = t_0;
	elseif (l <= 2.5e-145)
		tmp = (pi / F) * (-l / F);
	elseif (l <= 0.5)
		tmp = t_0;
	else
		tmp = pi * l;
	end
	tmp_2 = tmp;
end
code[F_, l_] := Block[{t$95$0 = N[(l * N[(Pi - N[(Pi / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[l, -0.5], N[(Pi * l), $MachinePrecision], If[LessEqual[l, 5.1e-220], t$95$0, If[LessEqual[l, 2.5e-145], N[(N[(Pi / F), $MachinePrecision] * N[((-l) / F), $MachinePrecision]), $MachinePrecision], If[LessEqual[l, 0.5], t$95$0, N[(Pi * l), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \ell \cdot \left(\pi - \frac{\pi}{F \cdot F}\right)\\
\mathbf{if}\;\ell \leq -0.5:\\
\;\;\;\;\pi \cdot \ell\\

\mathbf{elif}\;\ell \leq 5.1 \cdot 10^{-220}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;\ell \leq 2.5 \cdot 10^{-145}:\\
\;\;\;\;\frac{\pi}{F} \cdot \frac{-\ell}{F}\\

\mathbf{elif}\;\ell \leq 0.5:\\
\;\;\;\;t_0\\

\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if l < -0.5 or 0.5 < l

    1. Initial program 71.6%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Taylor expanded in l around 0 56.2%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    3. Step-by-step derivation
      1. associate-/l*56.2%

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

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

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{F \cdot F}{\pi}}} \]
    5. Taylor expanded in l around 0 56.2%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    6. Step-by-step derivation
      1. unpow256.2%

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

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

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    8. Taylor expanded in F around inf 98.0%

      \[\leadsto \color{blue}{\ell \cdot \pi} \]

    if -0.5 < l < 5.1000000000000001e-220 or 2.4999999999999999e-145 < l < 0.5

    1. Initial program 91.5%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Taylor expanded in l around 0 91.5%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    3. Step-by-step derivation
      1. associate-/l*91.5%

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

        \[\leadsto \pi \cdot \ell - \frac{\ell}{\frac{\color{blue}{F \cdot F}}{\pi}} \]
    4. Simplified91.5%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{F \cdot F}{\pi}}} \]
    5. Taylor expanded in l around 0 91.5%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    6. Step-by-step derivation
      1. unpow291.5%

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    7. Simplified99.6%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    8. Taylor expanded in l around 0 91.4%

      \[\leadsto \color{blue}{\ell \cdot \left(\pi - \frac{\pi}{{F}^{2}}\right)} \]
    9. Step-by-step derivation
      1. remove-double-neg91.4%

        \[\leadsto \ell \cdot \color{blue}{\left(-\left(-\left(\pi - \frac{\pi}{{F}^{2}}\right)\right)\right)} \]
      2. mul-1-neg91.4%

        \[\leadsto \ell \cdot \left(-\color{blue}{-1 \cdot \left(\pi - \frac{\pi}{{F}^{2}}\right)}\right) \]
      3. distribute-lft-out--91.4%

        \[\leadsto \ell \cdot \left(-\color{blue}{\left(-1 \cdot \pi - -1 \cdot \frac{\pi}{{F}^{2}}\right)}\right) \]
      4. mul-1-neg91.4%

        \[\leadsto \ell \cdot \color{blue}{\left(-1 \cdot \left(-1 \cdot \pi - -1 \cdot \frac{\pi}{{F}^{2}}\right)\right)} \]
      5. mul-1-neg91.4%

        \[\leadsto \ell \cdot \color{blue}{\left(-\left(-1 \cdot \pi - -1 \cdot \frac{\pi}{{F}^{2}}\right)\right)} \]
      6. distribute-lft-out--91.4%

        \[\leadsto \ell \cdot \left(-\color{blue}{-1 \cdot \left(\pi - \frac{\pi}{{F}^{2}}\right)}\right) \]
      7. mul-1-neg91.4%

        \[\leadsto \ell \cdot \left(-\color{blue}{\left(-\left(\pi - \frac{\pi}{{F}^{2}}\right)\right)}\right) \]
      8. remove-double-neg91.4%

        \[\leadsto \ell \cdot \color{blue}{\left(\pi - \frac{\pi}{{F}^{2}}\right)} \]
      9. unpow291.4%

        \[\leadsto \ell \cdot \left(\pi - \frac{\pi}{\color{blue}{F \cdot F}}\right) \]
    10. Simplified91.4%

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

    if 5.1000000000000001e-220 < l < 2.4999999999999999e-145

    1. Initial program 57.8%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Taylor expanded in l around 0 62.1%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    3. Step-by-step derivation
      1. associate-/l*61.7%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{{F}^{2}}{\pi}}} \]
      2. unpow261.7%

        \[\leadsto \pi \cdot \ell - \frac{\ell}{\frac{\color{blue}{F \cdot F}}{\pi}} \]
    4. Simplified61.7%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{F \cdot F}{\pi}}} \]
    5. Taylor expanded in l around 0 62.1%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    6. Step-by-step derivation
      1. unpow262.1%

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    7. Simplified99.7%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    8. Taylor expanded in F around 0 43.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{\ell \cdot \pi}{{F}^{2}}} \]
    9. Step-by-step derivation
      1. unpow243.1%

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

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

        \[\leadsto \color{blue}{-\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
      4. distribute-rgt-neg-in80.7%

        \[\leadsto \color{blue}{\frac{\ell}{F} \cdot \left(-\frac{\pi}{F}\right)} \]
      5. distribute-neg-frac80.7%

        \[\leadsto \frac{\ell}{F} \cdot \color{blue}{\frac{-\pi}{F}} \]
    10. Simplified80.7%

      \[\leadsto \color{blue}{\frac{\ell}{F} \cdot \frac{-\pi}{F}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification93.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -0.5:\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{elif}\;\ell \leq 5.1 \cdot 10^{-220}:\\ \;\;\;\;\ell \cdot \left(\pi - \frac{\pi}{F \cdot F}\right)\\ \mathbf{elif}\;\ell \leq 2.5 \cdot 10^{-145}:\\ \;\;\;\;\frac{\pi}{F} \cdot \frac{-\ell}{F}\\ \mathbf{elif}\;\ell \leq 0.5:\\ \;\;\;\;\ell \cdot \left(\pi - \frac{\pi}{F \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell\\ \end{array} \]

Alternative 8: 74.1% accurate, 2.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \cdot F \leq 5 \cdot 10^{-301} \lor \neg \left(F \cdot F \leq 2 \cdot 10^{-274}\right) \land F \cdot F \leq 2 \cdot 10^{-47}:\\ \;\;\;\;\frac{\ell}{F} \cdot \frac{-\pi}{F}\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell\\ \end{array} \end{array} \]
(FPCore (F l)
 :precision binary64
 (if (or (<= (* F F) 5e-301)
         (and (not (<= (* F F) 2e-274)) (<= (* F F) 2e-47)))
   (* (/ l F) (/ (- PI) F))
   (* PI l)))
double code(double F, double l) {
	double tmp;
	if (((F * F) <= 5e-301) || (!((F * F) <= 2e-274) && ((F * F) <= 2e-47))) {
		tmp = (l / F) * (-((double) M_PI) / F);
	} else {
		tmp = ((double) M_PI) * l;
	}
	return tmp;
}
public static double code(double F, double l) {
	double tmp;
	if (((F * F) <= 5e-301) || (!((F * F) <= 2e-274) && ((F * F) <= 2e-47))) {
		tmp = (l / F) * (-Math.PI / F);
	} else {
		tmp = Math.PI * l;
	}
	return tmp;
}
def code(F, l):
	tmp = 0
	if ((F * F) <= 5e-301) or (not ((F * F) <= 2e-274) and ((F * F) <= 2e-47)):
		tmp = (l / F) * (-math.pi / F)
	else:
		tmp = math.pi * l
	return tmp
function code(F, l)
	tmp = 0.0
	if ((Float64(F * F) <= 5e-301) || (!(Float64(F * F) <= 2e-274) && (Float64(F * F) <= 2e-47)))
		tmp = Float64(Float64(l / F) * Float64(Float64(-pi) / F));
	else
		tmp = Float64(pi * l);
	end
	return tmp
end
function tmp_2 = code(F, l)
	tmp = 0.0;
	if (((F * F) <= 5e-301) || (~(((F * F) <= 2e-274)) && ((F * F) <= 2e-47)))
		tmp = (l / F) * (-pi / F);
	else
		tmp = pi * l;
	end
	tmp_2 = tmp;
end
code[F_, l_] := If[Or[LessEqual[N[(F * F), $MachinePrecision], 5e-301], And[N[Not[LessEqual[N[(F * F), $MachinePrecision], 2e-274]], $MachinePrecision], LessEqual[N[(F * F), $MachinePrecision], 2e-47]]], N[(N[(l / F), $MachinePrecision] * N[((-Pi) / F), $MachinePrecision]), $MachinePrecision], N[(Pi * l), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \cdot F \leq 5 \cdot 10^{-301} \lor \neg \left(F \cdot F \leq 2 \cdot 10^{-274}\right) \land F \cdot F \leq 2 \cdot 10^{-47}:\\
\;\;\;\;\frac{\ell}{F} \cdot \frac{-\pi}{F}\\

\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 F F) < 5.00000000000000013e-301 or 1.99999999999999993e-274 < (*.f64 F F) < 1.9999999999999999e-47

    1. Initial program 54.8%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Taylor expanded in l around 0 48.1%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    3. Step-by-step derivation
      1. associate-/l*48.0%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{{F}^{2}}{\pi}}} \]
      2. unpow248.0%

        \[\leadsto \pi \cdot \ell - \frac{\ell}{\frac{\color{blue}{F \cdot F}}{\pi}} \]
    4. Simplified48.0%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{F \cdot F}{\pi}}} \]
    5. Taylor expanded in l around 0 48.1%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    6. Step-by-step derivation
      1. unpow248.1%

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    7. Simplified64.6%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    8. Taylor expanded in F around 0 48.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{\ell \cdot \pi}{{F}^{2}}} \]
    9. Step-by-step derivation
      1. unpow248.1%

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

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

        \[\leadsto \color{blue}{-\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
      4. distribute-rgt-neg-in64.6%

        \[\leadsto \color{blue}{\frac{\ell}{F} \cdot \left(-\frac{\pi}{F}\right)} \]
      5. distribute-neg-frac64.6%

        \[\leadsto \frac{\ell}{F} \cdot \color{blue}{\frac{-\pi}{F}} \]
    10. Simplified64.6%

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

    if 5.00000000000000013e-301 < (*.f64 F F) < 1.99999999999999993e-274 or 1.9999999999999999e-47 < (*.f64 F F)

    1. Initial program 95.8%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Taylor expanded in l around 0 88.7%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    3. Step-by-step derivation
      1. associate-/l*88.7%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{{F}^{2}}{\pi}}} \]
      2. unpow288.7%

        \[\leadsto \pi \cdot \ell - \frac{\ell}{\frac{\color{blue}{F \cdot F}}{\pi}} \]
    4. Simplified88.7%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{F \cdot F}{\pi}}} \]
    5. Taylor expanded in l around 0 88.7%

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

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    7. Simplified88.7%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    8. Taylor expanded in F around inf 94.1%

      \[\leadsto \color{blue}{\ell \cdot \pi} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification82.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \cdot F \leq 5 \cdot 10^{-301} \lor \neg \left(F \cdot F \leq 2 \cdot 10^{-274}\right) \land F \cdot F \leq 2 \cdot 10^{-47}:\\ \;\;\;\;\frac{\ell}{F} \cdot \frac{-\pi}{F}\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell\\ \end{array} \]

Alternative 9: 73.0% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq -4.6 \cdot 10^{-84} \lor \neg \left(\ell \leq -4.8 \cdot 10^{-200} \lor \neg \left(\ell \leq 1.15 \cdot 10^{-192}\right) \land \ell \leq 9.5 \cdot 10^{-62}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\frac{-\ell}{\frac{F \cdot F}{\pi}}\\ \end{array} \end{array} \]
(FPCore (F l)
 :precision binary64
 (if (or (<= l -4.6e-84)
         (not
          (or (<= l -4.8e-200) (and (not (<= l 1.15e-192)) (<= l 9.5e-62)))))
   (* PI l)
   (/ (- l) (/ (* F F) PI))))
double code(double F, double l) {
	double tmp;
	if ((l <= -4.6e-84) || !((l <= -4.8e-200) || (!(l <= 1.15e-192) && (l <= 9.5e-62)))) {
		tmp = ((double) M_PI) * l;
	} else {
		tmp = -l / ((F * F) / ((double) M_PI));
	}
	return tmp;
}
public static double code(double F, double l) {
	double tmp;
	if ((l <= -4.6e-84) || !((l <= -4.8e-200) || (!(l <= 1.15e-192) && (l <= 9.5e-62)))) {
		tmp = Math.PI * l;
	} else {
		tmp = -l / ((F * F) / Math.PI);
	}
	return tmp;
}
def code(F, l):
	tmp = 0
	if (l <= -4.6e-84) or not ((l <= -4.8e-200) or (not (l <= 1.15e-192) and (l <= 9.5e-62))):
		tmp = math.pi * l
	else:
		tmp = -l / ((F * F) / math.pi)
	return tmp
function code(F, l)
	tmp = 0.0
	if ((l <= -4.6e-84) || !((l <= -4.8e-200) || (!(l <= 1.15e-192) && (l <= 9.5e-62))))
		tmp = Float64(pi * l);
	else
		tmp = Float64(Float64(-l) / Float64(Float64(F * F) / pi));
	end
	return tmp
end
function tmp_2 = code(F, l)
	tmp = 0.0;
	if ((l <= -4.6e-84) || ~(((l <= -4.8e-200) || (~((l <= 1.15e-192)) && (l <= 9.5e-62)))))
		tmp = pi * l;
	else
		tmp = -l / ((F * F) / pi);
	end
	tmp_2 = tmp;
end
code[F_, l_] := If[Or[LessEqual[l, -4.6e-84], N[Not[Or[LessEqual[l, -4.8e-200], And[N[Not[LessEqual[l, 1.15e-192]], $MachinePrecision], LessEqual[l, 9.5e-62]]]], $MachinePrecision]], N[(Pi * l), $MachinePrecision], N[((-l) / N[(N[(F * F), $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -4.6 \cdot 10^{-84} \lor \neg \left(\ell \leq -4.8 \cdot 10^{-200} \lor \neg \left(\ell \leq 1.15 \cdot 10^{-192}\right) \land \ell \leq 9.5 \cdot 10^{-62}\right):\\
\;\;\;\;\pi \cdot \ell\\

\mathbf{else}:\\
\;\;\;\;\frac{-\ell}{\frac{F \cdot F}{\pi}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -4.59999999999999961e-84 or -4.80000000000000003e-200 < l < 1.15000000000000009e-192 or 9.49999999999999951e-62 < l

    1. Initial program 78.3%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Taylor expanded in l around 0 69.6%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    3. Step-by-step derivation
      1. associate-/l*69.6%

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{{F}^{2}}{\pi}}} \]
      2. unpow269.6%

        \[\leadsto \pi \cdot \ell - \frac{\ell}{\frac{\color{blue}{F \cdot F}}{\pi}} \]
    4. Simplified69.6%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{F \cdot F}{\pi}}} \]
    5. Taylor expanded in l around 0 69.6%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    6. Step-by-step derivation
      1. unpow269.6%

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

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

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    8. Taylor expanded in F around inf 82.3%

      \[\leadsto \color{blue}{\ell \cdot \pi} \]

    if -4.59999999999999961e-84 < l < -4.80000000000000003e-200 or 1.15000000000000009e-192 < l < 9.49999999999999951e-62

    1. Initial program 84.6%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Taylor expanded in l around 0 84.6%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    3. Step-by-step derivation
      1. associate-/l*84.5%

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

        \[\leadsto \pi \cdot \ell - \frac{\ell}{\frac{\color{blue}{F \cdot F}}{\pi}} \]
    4. Simplified84.5%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{F \cdot F}{\pi}}} \]
    5. Taylor expanded in l around 0 84.6%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
    6. Step-by-step derivation
      1. unpow284.6%

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    7. Simplified99.6%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
    8. Taylor expanded in F around 0 67.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{\ell \cdot \pi}{{F}^{2}}} \]
    9. Step-by-step derivation
      1. mul-1-neg67.1%

        \[\leadsto \color{blue}{-\frac{\ell \cdot \pi}{{F}^{2}}} \]
      2. associate-/l*67.0%

        \[\leadsto -\color{blue}{\frac{\ell}{\frac{{F}^{2}}{\pi}}} \]
      3. unpow267.0%

        \[\leadsto -\frac{\ell}{\frac{\color{blue}{F \cdot F}}{\pi}} \]
    10. Simplified67.0%

      \[\leadsto \color{blue}{-\frac{\ell}{\frac{F \cdot F}{\pi}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification79.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -4.6 \cdot 10^{-84} \lor \neg \left(\ell \leq -4.8 \cdot 10^{-200} \lor \neg \left(\ell \leq 1.15 \cdot 10^{-192}\right) \land \ell \leq 9.5 \cdot 10^{-62}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\frac{-\ell}{\frac{F \cdot F}{\pi}}\\ \end{array} \]

Alternative 10: 74.2% accurate, 3.0× speedup?

\[\begin{array}{l} \\ \pi \cdot \ell \end{array} \]
(FPCore (F l) :precision binary64 (* PI l))
double code(double F, double l) {
	return ((double) M_PI) * l;
}
public static double code(double F, double l) {
	return Math.PI * l;
}
def code(F, l):
	return math.pi * l
function code(F, l)
	return Float64(pi * l)
end
function tmp = code(F, l)
	tmp = pi * l;
end
code[F_, l_] := N[(Pi * l), $MachinePrecision]
\begin{array}{l}

\\
\pi \cdot \ell
\end{array}
Derivation
  1. Initial program 79.5%

    \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
  2. Taylor expanded in l around 0 72.5%

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
  3. Step-by-step derivation
    1. associate-/l*72.5%

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

      \[\leadsto \pi \cdot \ell - \frac{\ell}{\frac{\color{blue}{F \cdot F}}{\pi}} \]
  4. Simplified72.5%

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{\frac{F \cdot F}{\pi}}} \]
  5. Taylor expanded in l around 0 72.5%

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell \cdot \pi}{{F}^{2}}} \]
  6. Step-by-step derivation
    1. unpow272.5%

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

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
  7. Simplified79.1%

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\ell}{F} \cdot \frac{\pi}{F}} \]
  8. Taylor expanded in F around inf 70.3%

    \[\leadsto \color{blue}{\ell \cdot \pi} \]
  9. Final simplification70.3%

    \[\leadsto \pi \cdot \ell \]

Reproduce

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