VandenBroeck and Keller, Equation (6)

Percentage Accurate: 76.6% → 99.0%
Time: 16.6s
Alternatives: 10
Speedup: 1.5×

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: 76.6% accurate, 1.0× speedup?

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

\\
\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)
\end{array}

Alternative 1: 99.0% accurate, 0.6× speedup?

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

    1. Initial program 63.7%

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

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

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

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

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

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

      \[\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 -4e19 < (*.f64 (PI.f64) l) < 1e10

    1. Initial program 94.2%

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

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

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

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

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

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

Alternative 2: 98.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -4 \cdot 10^{+19} \lor \neg \left(\pi \cdot \ell \leq 10000000000\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell - \frac{\pi \cdot \frac{\ell}{F}}{F}\\ \end{array} \end{array} \]
(FPCore (F l)
 :precision binary64
 (if (or (<= (* PI l) -4e+19) (not (<= (* PI l) 10000000000.0)))
   (* PI l)
   (- (* PI l) (/ (* PI (/ l F)) F))))
double code(double F, double l) {
	double tmp;
	if (((((double) M_PI) * l) <= -4e+19) || !((((double) M_PI) * l) <= 10000000000.0)) {
		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) <= -4e+19) || !((Math.PI * l) <= 10000000000.0)) {
		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) <= -4e+19) or not ((math.pi * l) <= 10000000000.0):
		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) <= -4e+19) || !(Float64(pi * l) <= 10000000000.0))
		tmp = Float64(pi * l);
	else
		tmp = Float64(Float64(pi * l) - Float64(Float64(pi * Float64(l / F)) / F));
	end
	return tmp
end
function tmp_2 = code(F, l)
	tmp = 0.0;
	if (((pi * l) <= -4e+19) || ~(((pi * l) <= 10000000000.0)))
		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], -4e+19], N[Not[LessEqual[N[(Pi * l), $MachinePrecision], 10000000000.0]], $MachinePrecision]], N[(Pi * l), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] - N[(N[(Pi * N[(l / F), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


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

    1. Initial program 63.7%

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

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

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

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

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

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

      \[\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 -4e19 < (*.f64 (PI.f64) l) < 1e10

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\sqrt{\ell \cdot \pi} \cdot \frac{\sqrt{\ell \cdot \pi}}{F}}{F}} \]
      3. div-inv42.1%

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

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

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

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

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

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

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

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

Alternative 3: 93.2% accurate, 1.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -3.85e18 or 3.2e10 < l

    1. Initial program 63.7%

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

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

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

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

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

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

      \[\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 -3.85e18 < l < 3.2e10

    1. Initial program 94.2%

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

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

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

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

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

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

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

Alternative 4: 93.2% accurate, 1.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -3.85e18 or 3.2e10 < l

    1. Initial program 63.7%

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

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

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

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

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

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

      \[\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 -3.85e18 < l < 3.2e10

    1. Initial program 94.2%

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

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

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

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

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

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

Alternative 5: 92.8% accurate, 1.5× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -3.85e18 or 3.2e10 < l

    1. Initial program 63.7%

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

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

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

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

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

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

      \[\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 -3.85e18 < l < 3.2e10

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \ell \cdot \left(\pi - \pi \cdot \left(\color{blue}{{F}^{-1}} \cdot \frac{1}{F}\right)\right) \]
      8. unpow-193.7%

        \[\leadsto \ell \cdot \left(\pi - \pi \cdot \left({F}^{-1} \cdot \color{blue}{{F}^{-1}}\right)\right) \]
      9. pow-sqr93.8%

        \[\leadsto \ell \cdot \left(\pi - \pi \cdot \color{blue}{{F}^{\left(2 \cdot -1\right)}}\right) \]
      10. metadata-eval93.8%

        \[\leadsto \ell \cdot \left(\pi - \pi \cdot {F}^{\color{blue}{-2}}\right) \]
      11. *-rgt-identity93.8%

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

        \[\leadsto \ell \cdot \color{blue}{\left(\pi \cdot \left(1 - {F}^{-2}\right)\right)} \]
    9. Simplified93.8%

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

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

Alternative 6: 50.7% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;F \leq 4.6 \cdot 10^{-195}:\\
\;\;\;\;\pi \cdot \frac{\frac{\ell}{F}}{-F}\\

\mathbf{elif}\;F \leq 4 \cdot 10^{-95} \lor \neg \left(F \leq 3 \cdot 10^{-70}\right):\\
\;\;\;\;\pi \cdot \ell\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < 4.6000000000000004e-195

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{\ell}{\color{blue}{F \cdot \frac{F}{\pi}}} \]
      5. distribute-neg-frac24.9%

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

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

      \[\leadsto \color{blue}{\frac{-\ell}{\frac{F \cdot F}{\pi}}} \]
    10. Step-by-step derivation
      1. add-sqr-sqrt13.7%

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

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-\ell\right) \cdot \left(-\ell\right)}}}{\frac{F \cdot F}{\pi}} \]
      3. sqr-neg12.5%

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

        \[\leadsto \frac{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}{\frac{F \cdot F}{\pi}} \]
      5. add-sqr-sqrt3.9%

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

        \[\leadsto \frac{\ell}{\color{blue}{\frac{F}{\frac{\pi}{F}}}} \]
      7. associate-/r/3.9%

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

        \[\leadsto \color{blue}{\frac{\frac{\ell}{F}}{\frac{F}{\pi}}} \]
      9. associate-/l*4.0%

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

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

        \[\leadsto \color{blue}{\left(-\frac{\ell}{F} \cdot \pi\right) \cdot \frac{1}{-F}} \]
      12. *-commutative4.0%

        \[\leadsto \left(-\color{blue}{\pi \cdot \frac{\ell}{F}}\right) \cdot \frac{1}{-F} \]
      13. distribute-rgt-neg-in4.0%

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

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

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

        \[\leadsto \left(\pi \cdot \left(-\frac{\color{blue}{\sqrt{\left(-\ell\right) \cdot \left(-\ell\right)}}}{-F}\right)\right) \cdot \frac{1}{-F} \]
      17. sqr-neg8.9%

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

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

        \[\leadsto \left(\pi \cdot \left(-\frac{\color{blue}{\ell}}{-F}\right)\right) \cdot \frac{1}{-F} \]
      20. distribute-frac-neg27.8%

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

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

      \[\leadsto \color{blue}{\left(\pi \cdot \frac{\ell}{F}\right) \cdot \frac{1}{-F}} \]
    12. Step-by-step derivation
      1. associate-*l*27.7%

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

        \[\leadsto \pi \cdot \color{blue}{\frac{\frac{\ell}{F} \cdot 1}{-F}} \]
      3. *-rgt-identity27.8%

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

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

    if 4.6000000000000004e-195 < F < 3.99999999999999996e-95 or 3.0000000000000001e-70 < F

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

    if 3.99999999999999996e-95 < F < 3.0000000000000001e-70

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{\ell}{\color{blue}{F \cdot \frac{F}{\pi}}} \]
      5. distribute-neg-frac72.9%

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

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

      \[\leadsto \color{blue}{\frac{-\ell}{\frac{F \cdot F}{\pi}}} \]
    10. Step-by-step derivation
      1. clear-num72.7%

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

        \[\leadsto \frac{-\ell}{\color{blue}{{\left(\frac{\pi}{F \cdot F}\right)}^{-1}}} \]
    11. Applied egg-rr72.7%

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

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

        \[\leadsto \frac{-\ell}{\frac{1}{\color{blue}{\frac{\frac{\pi}{F}}{F}}}} \]
    13. Simplified73.1%

      \[\leadsto \frac{-\ell}{\color{blue}{\frac{1}{\frac{\frac{\pi}{F}}{F}}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification51.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq 4.6 \cdot 10^{-195}:\\ \;\;\;\;\pi \cdot \frac{\frac{\ell}{F}}{-F}\\ \mathbf{elif}\;F \leq 4 \cdot 10^{-95} \lor \neg \left(F \leq 3 \cdot 10^{-70}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\frac{-\ell}{\frac{1}{\frac{\frac{\pi}{F}}{F}}}\\ \end{array} \]

Alternative 7: 50.7% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;F \leq 4.8 \cdot 10^{-196}:\\
\;\;\;\;\pi \cdot \frac{\frac{\ell}{F}}{-F}\\

\mathbf{elif}\;F \leq 2.3 \cdot 10^{-95} \lor \neg \left(F \leq 1.9 \cdot 10^{-70}\right):\\
\;\;\;\;\pi \cdot \ell\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < 4.80000000000000041e-196

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{\ell}{\color{blue}{F \cdot \frac{F}{\pi}}} \]
      5. distribute-neg-frac24.9%

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

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

      \[\leadsto \color{blue}{\frac{-\ell}{\frac{F \cdot F}{\pi}}} \]
    10. Step-by-step derivation
      1. add-sqr-sqrt13.7%

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

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-\ell\right) \cdot \left(-\ell\right)}}}{\frac{F \cdot F}{\pi}} \]
      3. sqr-neg12.5%

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

        \[\leadsto \frac{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}{\frac{F \cdot F}{\pi}} \]
      5. add-sqr-sqrt3.9%

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

        \[\leadsto \frac{\ell}{\color{blue}{\frac{F}{\frac{\pi}{F}}}} \]
      7. associate-/r/3.9%

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

        \[\leadsto \color{blue}{\frac{\frac{\ell}{F}}{\frac{F}{\pi}}} \]
      9. associate-/l*4.0%

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

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

        \[\leadsto \color{blue}{\left(-\frac{\ell}{F} \cdot \pi\right) \cdot \frac{1}{-F}} \]
      12. *-commutative4.0%

        \[\leadsto \left(-\color{blue}{\pi \cdot \frac{\ell}{F}}\right) \cdot \frac{1}{-F} \]
      13. distribute-rgt-neg-in4.0%

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

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

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

        \[\leadsto \left(\pi \cdot \left(-\frac{\color{blue}{\sqrt{\left(-\ell\right) \cdot \left(-\ell\right)}}}{-F}\right)\right) \cdot \frac{1}{-F} \]
      17. sqr-neg8.9%

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

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

        \[\leadsto \left(\pi \cdot \left(-\frac{\color{blue}{\ell}}{-F}\right)\right) \cdot \frac{1}{-F} \]
      20. distribute-frac-neg27.8%

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

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

      \[\leadsto \color{blue}{\left(\pi \cdot \frac{\ell}{F}\right) \cdot \frac{1}{-F}} \]
    12. Step-by-step derivation
      1. associate-*l*27.7%

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

        \[\leadsto \pi \cdot \color{blue}{\frac{\frac{\ell}{F} \cdot 1}{-F}} \]
      3. *-rgt-identity27.8%

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

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

    if 4.80000000000000041e-196 < F < 2.29999999999999999e-95 or 1.8999999999999999e-70 < F

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

    if 2.29999999999999999e-95 < F < 1.8999999999999999e-70

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{\ell}{\color{blue}{F \cdot \frac{F}{\pi}}} \]
      5. distribute-neg-frac72.9%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq 4.8 \cdot 10^{-196}:\\ \;\;\;\;\pi \cdot \frac{\frac{\ell}{F}}{-F}\\ \mathbf{elif}\;F \leq 2.3 \cdot 10^{-95} \lor \neg \left(F \leq 1.9 \cdot 10^{-70}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\left(-\ell\right) \cdot \frac{\pi}{F \cdot F}\\ \end{array} \]

Alternative 8: 50.6% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;F \leq 3.35 \cdot 10^{-195}:\\ \;\;\;\;\pi \cdot \frac{\frac{\ell}{F}}{-F}\\ \mathbf{elif}\;F \leq 4.6 \cdot 10^{-89} \lor \neg \left(F \leq 2.2 \cdot 10^{-69}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\frac{-\ell}{\frac{F \cdot F}{\pi}}\\ \end{array} \end{array} \]
(FPCore (F l)
 :precision binary64
 (if (<= F 3.35e-195)
   (* PI (/ (/ l F) (- F)))
   (if (or (<= F 4.6e-89) (not (<= F 2.2e-69)))
     (* PI l)
     (/ (- l) (/ (* F F) PI)))))
double code(double F, double l) {
	double tmp;
	if (F <= 3.35e-195) {
		tmp = ((double) M_PI) * ((l / F) / -F);
	} else if ((F <= 4.6e-89) || !(F <= 2.2e-69)) {
		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 (F <= 3.35e-195) {
		tmp = Math.PI * ((l / F) / -F);
	} else if ((F <= 4.6e-89) || !(F <= 2.2e-69)) {
		tmp = Math.PI * l;
	} else {
		tmp = -l / ((F * F) / Math.PI);
	}
	return tmp;
}
def code(F, l):
	tmp = 0
	if F <= 3.35e-195:
		tmp = math.pi * ((l / F) / -F)
	elif (F <= 4.6e-89) or not (F <= 2.2e-69):
		tmp = math.pi * l
	else:
		tmp = -l / ((F * F) / math.pi)
	return tmp
function code(F, l)
	tmp = 0.0
	if (F <= 3.35e-195)
		tmp = Float64(pi * Float64(Float64(l / F) / Float64(-F)));
	elseif ((F <= 4.6e-89) || !(F <= 2.2e-69))
		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 (F <= 3.35e-195)
		tmp = pi * ((l / F) / -F);
	elseif ((F <= 4.6e-89) || ~((F <= 2.2e-69)))
		tmp = pi * l;
	else
		tmp = -l / ((F * F) / pi);
	end
	tmp_2 = tmp;
end
code[F_, l_] := If[LessEqual[F, 3.35e-195], N[(Pi * N[(N[(l / F), $MachinePrecision] / (-F)), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[F, 4.6e-89], N[Not[LessEqual[F, 2.2e-69]], $MachinePrecision]], N[(Pi * l), $MachinePrecision], N[((-l) / N[(N[(F * F), $MachinePrecision] / Pi), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;F \leq 3.35 \cdot 10^{-195}:\\
\;\;\;\;\pi \cdot \frac{\frac{\ell}{F}}{-F}\\

\mathbf{elif}\;F \leq 4.6 \cdot 10^{-89} \lor \neg \left(F \leq 2.2 \cdot 10^{-69}\right):\\
\;\;\;\;\pi \cdot \ell\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if F < 3.3500000000000001e-195

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{\ell}{\color{blue}{F \cdot \frac{F}{\pi}}} \]
      5. distribute-neg-frac24.9%

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

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

      \[\leadsto \color{blue}{\frac{-\ell}{\frac{F \cdot F}{\pi}}} \]
    10. Step-by-step derivation
      1. add-sqr-sqrt13.7%

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

        \[\leadsto \frac{\color{blue}{\sqrt{\left(-\ell\right) \cdot \left(-\ell\right)}}}{\frac{F \cdot F}{\pi}} \]
      3. sqr-neg12.5%

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

        \[\leadsto \frac{\color{blue}{\sqrt{\ell} \cdot \sqrt{\ell}}}{\frac{F \cdot F}{\pi}} \]
      5. add-sqr-sqrt3.9%

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

        \[\leadsto \frac{\ell}{\color{blue}{\frac{F}{\frac{\pi}{F}}}} \]
      7. associate-/r/3.9%

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

        \[\leadsto \color{blue}{\frac{\frac{\ell}{F}}{\frac{F}{\pi}}} \]
      9. associate-/l*4.0%

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

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

        \[\leadsto \color{blue}{\left(-\frac{\ell}{F} \cdot \pi\right) \cdot \frac{1}{-F}} \]
      12. *-commutative4.0%

        \[\leadsto \left(-\color{blue}{\pi \cdot \frac{\ell}{F}}\right) \cdot \frac{1}{-F} \]
      13. distribute-rgt-neg-in4.0%

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

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

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

        \[\leadsto \left(\pi \cdot \left(-\frac{\color{blue}{\sqrt{\left(-\ell\right) \cdot \left(-\ell\right)}}}{-F}\right)\right) \cdot \frac{1}{-F} \]
      17. sqr-neg8.9%

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

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

        \[\leadsto \left(\pi \cdot \left(-\frac{\color{blue}{\ell}}{-F}\right)\right) \cdot \frac{1}{-F} \]
      20. distribute-frac-neg27.8%

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

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

      \[\leadsto \color{blue}{\left(\pi \cdot \frac{\ell}{F}\right) \cdot \frac{1}{-F}} \]
    12. Step-by-step derivation
      1. associate-*l*27.7%

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

        \[\leadsto \pi \cdot \color{blue}{\frac{\frac{\ell}{F} \cdot 1}{-F}} \]
      3. *-rgt-identity27.8%

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

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

    if 3.3500000000000001e-195 < F < 4.6e-89 or 2.2e-69 < F

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

    if 4.6e-89 < F < 2.2e-69

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{\ell}{\color{blue}{F \cdot \frac{F}{\pi}}} \]
      5. distribute-neg-frac72.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq 3.35 \cdot 10^{-195}:\\ \;\;\;\;\pi \cdot \frac{\frac{\ell}{F}}{-F}\\ \mathbf{elif}\;F \leq 4.6 \cdot 10^{-89} \lor \neg \left(F \leq 2.2 \cdot 10^{-69}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\frac{-\ell}{\frac{F \cdot F}{\pi}}\\ \end{array} \]

Alternative 9: 73.6% accurate, 2.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;F \leq 3.5 \cdot 10^{-90} \lor \neg \left(F \leq 5.2 \cdot 10^{-70}\right):\\
\;\;\;\;\pi \cdot \ell\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if F < 3.4999999999999999e-90 or 5.20000000000000004e-70 < F

    1. Initial program 78.7%

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

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

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

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

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

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

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

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

    if 3.4999999999999999e-90 < F < 5.20000000000000004e-70

    1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{\ell}{\color{blue}{F \cdot \frac{F}{\pi}}} \]
      5. distribute-neg-frac72.9%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 73.6% 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.2%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\ell \cdot \pi} \]
  8. Final simplification77.2%

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

Reproduce

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