VandenBroeck and Keller, Equation (6)

Percentage Accurate: 76.3% → 98.5%
Time: 23.7s
Alternatives: 7
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 7 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: 76.3% 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.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -1 \cdot 10^{+34} \lor \neg \left(\pi \cdot \ell \leq 2 \cdot 10^{+15}\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) -1e+34) (not (<= (* PI l) 2e+15)))
   (* PI l)
   (- (* PI l) (/ (/ (tan (* PI l)) F) F))))
double code(double F, double l) {
	double tmp;
	if (((((double) M_PI) * l) <= -1e+34) || !((((double) M_PI) * l) <= 2e+15)) {
		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) <= -1e+34) || !((Math.PI * l) <= 2e+15)) {
		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) <= -1e+34) or not ((math.pi * l) <= 2e+15):
		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) <= -1e+34) || !(Float64(pi * l) <= 2e+15))
		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) <= -1e+34) || ~(((pi * l) <= 2e+15)))
		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], -1e+34], N[Not[LessEqual[N[(Pi * l), $MachinePrecision], 2e+15]], $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 -1 \cdot 10^{+34} \lor \neg \left(\pi \cdot \ell \leq 2 \cdot 10^{+15}\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) < -9.99999999999999946e33 or 2e15 < (*.f64 (PI.f64) l)

    1. Initial program 62.6%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\ell \cdot \left(\pi - \frac{\pi}{F \cdot F}\right)} \]
    7. Taylor expanded in F around inf 99.5%

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

    if -9.99999999999999946e33 < (*.f64 (PI.f64) l) < 2e15

    1. Initial program 90.0%

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

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

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

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

      \[\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.2%

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

Alternative 2: 98.4% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 63.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\ell \cdot \left(\pi - \frac{\pi}{F \cdot F}\right)} \]
    7. Taylor expanded in F around inf 98.8%

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

    if -4e4 < (*.f64 (PI.f64) l) < 2e15

    1. Initial program 90.0%

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

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

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

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

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

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

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

        \[\leadsto \pi \cdot \ell - \frac{\pi \cdot \ell}{\color{blue}{F \cdot F}} \]
      3. times-frac98.8%

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

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

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

Alternative 3: 98.4% accurate, 0.7× speedup?

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

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

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


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

    1. Initial program 63.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\ell \cdot \left(\pi - \frac{\pi}{F \cdot F}\right)} \]
    7. Taylor expanded in F around inf 98.8%

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

    if -4e4 < (*.f64 (PI.f64) l) < 2e15

    1. Initial program 90.0%

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

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

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

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

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

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

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

Alternative 4: 93.4% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 63.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\ell \cdot \left(\pi - \frac{\pi}{F \cdot F}\right)} \]
    7. Taylor expanded in F around inf 98.8%

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

    if -4e4 < (*.f64 (PI.f64) l) < 2e15

    1. Initial program 90.0%

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

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

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

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

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

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

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

        \[\leadsto \pi \cdot \ell - \frac{\pi \cdot \ell}{\color{blue}{F \cdot F}} \]
      3. times-frac98.8%

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

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

      \[\leadsto \color{blue}{\ell \cdot \left(\pi - \frac{\pi}{{F}^{2}}\right)} \]
    8. Step-by-step derivation
      1. distribute-rgt-out--89.8%

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

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

        \[\leadsto \ell \cdot \pi - \frac{\pi}{\color{blue}{F \cdot F}} \cdot \ell \]
      4. associate-/r/90.5%

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

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

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

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

        \[\leadsto \ell \cdot \pi - \color{blue}{\frac{\frac{\ell}{F}}{F} \cdot \pi} \]
      9. associate-/r*90.6%

        \[\leadsto \ell \cdot \pi - \color{blue}{\frac{\ell}{F \cdot F}} \cdot \pi \]
      10. distribute-rgt-out--90.6%

        \[\leadsto \color{blue}{\pi \cdot \left(\ell - \frac{\ell}{F \cdot F}\right)} \]
    9. Simplified90.6%

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

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

Alternative 5: 62.5% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
t_0 := \pi \cdot \ell + -1\\
t_1 := \frac{\frac{\ell}{F}}{F} \cdot \left(-\pi\right)\\
\mathbf{if}\;F \leq 2.1 \cdot 10^{-107}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;F \leq 2 \cdot 10^{-83}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;F \leq 8.5 \cdot 10^{-38}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;F \leq 2 \cdot 10^{-17}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < 2.0999999999999999e-107 or 2.0000000000000001e-83 < F < 8.50000000000000046e-38

    1. Initial program 64.1%

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

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

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

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

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

      \[\leadsto \pi \cdot \ell - \color{blue}{e^{\log \left(\frac{F}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}\right) \cdot -1}} \]
    4. Step-by-step derivation
      1. exp-to-pow70.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \pi \cdot \ell - \frac{\frac{\sqrt{\tan \left(\pi \cdot \ell\right)}}{\color{blue}{F}}}{\sqrt{\frac{F}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}}} \]
      12. add-exp-log26.9%

        \[\leadsto \pi \cdot \ell - \frac{\frac{\sqrt{\tan \left(\pi \cdot \ell\right)}}{F}}{\sqrt{\color{blue}{e^{\log \left(\frac{F}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}\right)}}}} \]
      13. add-sqr-sqrt15.5%

        \[\leadsto \pi \cdot \ell - \frac{\frac{\sqrt{\tan \left(\pi \cdot \ell\right)}}{F}}{\sqrt{e^{\color{blue}{\sqrt{\log \left(\frac{F}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}\right)} \cdot \sqrt{\log \left(\frac{F}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}\right)}}}}} \]
    5. Applied egg-rr31.5%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\sqrt{\tan \left(\pi \cdot \ell\right)}}{F}}{\frac{\sqrt{\tan \left(\pi \cdot \ell\right)}}{F}}} \]
    6. Step-by-step derivation
      1. *-inverses57.7%

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

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

    if 2.0999999999999999e-107 < F < 2.0000000000000001e-83 or 8.50000000000000046e-38 < F < 2.00000000000000014e-17

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{\ell}{F \cdot F} \cdot \pi} \]
      4. associate-/r*80.0%

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

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

    if 2.00000000000000014e-17 < F

    1. Initial program 99.6%

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

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

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

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

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

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

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

        \[\leadsto \ell \cdot \left(\pi - \frac{\pi}{\color{blue}{F \cdot F}}\right) \]
    6. Simplified97.9%

      \[\leadsto \color{blue}{\ell \cdot \left(\pi - \frac{\pi}{F \cdot F}\right)} \]
    7. Taylor expanded in F around inf 99.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq 2.1 \cdot 10^{-107}:\\ \;\;\;\;\pi \cdot \ell + -1\\ \mathbf{elif}\;F \leq 2 \cdot 10^{-83}:\\ \;\;\;\;\frac{\frac{\ell}{F}}{F} \cdot \left(-\pi\right)\\ \mathbf{elif}\;F \leq 8.5 \cdot 10^{-38}:\\ \;\;\;\;\pi \cdot \ell + -1\\ \mathbf{elif}\;F \leq 2 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{\ell}{F}}{F} \cdot \left(-\pi\right)\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell\\ \end{array} \]

Alternative 6: 62.5% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
t_0 := \pi \cdot \ell + -1\\
\mathbf{if}\;F \leq 6.2 \cdot 10^{-109}:\\
\;\;\;\;t_0\\

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

\mathbf{elif}\;F \leq 9.8 \cdot 10^{-38}:\\
\;\;\;\;t_0\\

\mathbf{elif}\;F \leq 2.2 \cdot 10^{-17}:\\
\;\;\;\;\frac{\frac{\ell}{F}}{F} \cdot \left(-\pi\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if F < 6.1999999999999999e-109 or 2.04999999999999998e-82 < F < 9.80000000000000078e-38

    1. Initial program 64.1%

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

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

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

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

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

      \[\leadsto \pi \cdot \ell - \color{blue}{e^{\log \left(\frac{F}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}\right) \cdot -1}} \]
    4. Step-by-step derivation
      1. exp-to-pow70.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \pi \cdot \ell - \frac{\frac{\sqrt{\tan \left(\pi \cdot \ell\right)}}{\color{blue}{F}}}{\sqrt{\frac{F}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}}} \]
      12. add-exp-log26.9%

        \[\leadsto \pi \cdot \ell - \frac{\frac{\sqrt{\tan \left(\pi \cdot \ell\right)}}{F}}{\sqrt{\color{blue}{e^{\log \left(\frac{F}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}\right)}}}} \]
      13. add-sqr-sqrt15.5%

        \[\leadsto \pi \cdot \ell - \frac{\frac{\sqrt{\tan \left(\pi \cdot \ell\right)}}{F}}{\sqrt{e^{\color{blue}{\sqrt{\log \left(\frac{F}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}\right)} \cdot \sqrt{\log \left(\frac{F}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}\right)}}}}} \]
    5. Applied egg-rr31.5%

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\sqrt{\tan \left(\pi \cdot \ell\right)}}{F}}{\frac{\sqrt{\tan \left(\pi \cdot \ell\right)}}{F}}} \]
    6. Step-by-step derivation
      1. *-inverses57.7%

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

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

    if 6.1999999999999999e-109 < F < 2.04999999999999998e-82

    1. Initial program 99.4%

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

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

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

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

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

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

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

        \[\leadsto \ell \cdot \left(\pi - \frac{\pi}{\color{blue}{F \cdot F}}\right) \]
    6. Simplified79.7%

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

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

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

      \[\leadsto \ell \cdot \left(\pi - \frac{\color{blue}{\sqrt[3]{{\pi}^{3}}}}{F \cdot F}\right) \]
    9. Taylor expanded in F around 0 79.4%

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

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

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

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

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

    if 9.80000000000000078e-38 < F < 2.2e-17

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{\ell}{F \cdot F} \cdot \pi} \]
      4. associate-/r*80.0%

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

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

    if 2.2e-17 < F

    1. Initial program 99.6%

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

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

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

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

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

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

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

        \[\leadsto \ell \cdot \left(\pi - \frac{\pi}{\color{blue}{F \cdot F}}\right) \]
    6. Simplified97.9%

      \[\leadsto \color{blue}{\ell \cdot \left(\pi - \frac{\pi}{F \cdot F}\right)} \]
    7. Taylor expanded in F around inf 99.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq 6.2 \cdot 10^{-109}:\\ \;\;\;\;\pi \cdot \ell + -1\\ \mathbf{elif}\;F \leq 2.05 \cdot 10^{-82}:\\ \;\;\;\;\frac{-\ell}{\frac{F \cdot F}{\pi}}\\ \mathbf{elif}\;F \leq 9.8 \cdot 10^{-38}:\\ \;\;\;\;\pi \cdot \ell + -1\\ \mathbf{elif}\;F \leq 2.2 \cdot 10^{-17}:\\ \;\;\;\;\frac{\frac{\ell}{F}}{F} \cdot \left(-\pi\right)\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell\\ \end{array} \]

Alternative 7: 74.1% 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 75.3%

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

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

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

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

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

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

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

      \[\leadsto \ell \cdot \left(\pi - \frac{\pi}{\color{blue}{F \cdot F}}\right) \]
  6. Simplified66.7%

    \[\leadsto \color{blue}{\ell \cdot \left(\pi - \frac{\pi}{F \cdot F}\right)} \]
  7. Taylor expanded in F around inf 76.5%

    \[\leadsto \color{blue}{\ell \cdot \pi} \]
  8. Final simplification76.5%

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

Reproduce

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