VandenBroeck and Keller, Equation (6)

Percentage Accurate: 76.2% → 98.8%
Time: 13.6s
Alternatives: 7
Speedup: 2.8×

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.2% 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.8% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -5 \cdot 10^{+26} \lor \neg \left(\pi \cdot \ell \leq 5000000000000\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) -5e+26) (not (<= (* PI l) 5000000000000.0)))
   (* PI l)
   (- (* PI l) (/ (/ (tan (* PI l)) F) F))))
double code(double F, double l) {
	double tmp;
	if (((((double) M_PI) * l) <= -5e+26) || !((((double) M_PI) * l) <= 5000000000000.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) <= -5e+26) || !((Math.PI * l) <= 5000000000000.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) <= -5e+26) or not ((math.pi * l) <= 5000000000000.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) <= -5e+26) || !(Float64(pi * l) <= 5000000000000.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) <= -5e+26) || ~(((pi * l) <= 5000000000000.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], -5e+26], N[Not[LessEqual[N[(Pi * l), $MachinePrecision], 5000000000000.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 -5 \cdot 10^{+26} \lor \neg \left(\pi \cdot \ell \leq 5000000000000\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) < -5.0000000000000001e26 or 5e12 < (*.f64 (PI.f64) l)

    1. Initial program 62.4%

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

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

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

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

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

        \[\leadsto \ell \cdot \left(\pi - \frac{\pi}{\color{blue}{F \cdot F}}\right) \]
    6. Simplified48.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 -5.0000000000000001e26 < (*.f64 (PI.f64) l) < 5e12

    1. Initial program 88.2%

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

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

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

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

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

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

Alternative 2: 97.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -5 \cdot 10^{+26} \lor \neg \left(\pi \cdot \ell \leq 5000000\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) -5e+26) (not (<= (* PI l) 5000000.0)))
   (* PI l)
   (- (* PI l) (* (/ PI F) (/ l F)))))
double code(double F, double l) {
	double tmp;
	if (((((double) M_PI) * l) <= -5e+26) || !((((double) M_PI) * l) <= 5000000.0)) {
		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) <= -5e+26) || !((Math.PI * l) <= 5000000.0)) {
		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) <= -5e+26) or not ((math.pi * l) <= 5000000.0):
		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) <= -5e+26) || !(Float64(pi * l) <= 5000000.0))
		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) <= -5e+26) || ~(((pi * l) <= 5000000.0)))
		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], -5e+26], N[Not[LessEqual[N[(Pi * l), $MachinePrecision], 5000000.0]], $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 -5 \cdot 10^{+26} \lor \neg \left(\pi \cdot \ell \leq 5000000\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) < -5.0000000000000001e26 or 5e6 < (*.f64 (PI.f64) l)

    1. Initial program 62.7%

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

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

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

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

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

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

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

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

    if -5.0000000000000001e26 < (*.f64 (PI.f64) l) < 5e6

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 74.2% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\ell \leq -3500000 \lor \neg \left(\ell \leq -1.4 \cdot 10^{-121} \lor \neg \left(\ell \leq -1.06 \cdot 10^{-195}\right) \land \ell \leq 9 \cdot 10^{-202}\right):\\
\;\;\;\;\pi \cdot \ell\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -3.5e6 or -1.4000000000000001e-121 < l < -1.06e-195 or 9.00000000000000078e-202 < l

    1. Initial program 71.9%

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

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

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

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

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

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

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

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

    if -3.5e6 < l < -1.4000000000000001e-121 or -1.06e-195 < l < 9.00000000000000078e-202

    1. Initial program 85.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{\ell}{{F}^{2}} \cdot \pi} \]
      3. distribute-lft-neg-in50.5%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{\frac{\ell}{F}}{F}} \cdot \pi \]
      6. *-rgt-identity63.1%

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

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

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

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

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

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

        \[\leadsto -\left(\ell \cdot \left({F}^{-1} \cdot \color{blue}{{F}^{-1}}\right)\right) \cdot \pi \]
      13. pow-sqr49.4%

        \[\leadsto -\left(\ell \cdot \color{blue}{{F}^{\left(2 \cdot -1\right)}}\right) \cdot \pi \]
      14. metadata-eval49.4%

        \[\leadsto -\left(\ell \cdot {F}^{\color{blue}{-2}}\right) \cdot \pi \]
      15. distribute-rgt-neg-in49.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -3500000 \lor \neg \left(\ell \leq -1.4 \cdot 10^{-121} \lor \neg \left(\ell \leq -1.06 \cdot 10^{-195}\right) \land \ell \leq 9 \cdot 10^{-202}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \frac{\frac{-\ell}{F}}{F}\\ \end{array} \]

Alternative 4: 92.2% accurate, 2.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq -2.9 \cdot 10^{+24} \lor \neg \left(\ell \leq 3600000\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 (<= l -2.9e+24) (not (<= l 3600000.0)))
   (* PI l)
   (* PI (- l (/ l (* F F))))))
double code(double F, double l) {
	double tmp;
	if ((l <= -2.9e+24) || !(l <= 3600000.0)) {
		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 ((l <= -2.9e+24) || !(l <= 3600000.0)) {
		tmp = Math.PI * l;
	} else {
		tmp = Math.PI * (l - (l / (F * F)));
	}
	return tmp;
}
def code(F, l):
	tmp = 0
	if (l <= -2.9e+24) or not (l <= 3600000.0):
		tmp = math.pi * l
	else:
		tmp = math.pi * (l - (l / (F * F)))
	return tmp
function code(F, l)
	tmp = 0.0
	if ((l <= -2.9e+24) || !(l <= 3600000.0))
		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 ((l <= -2.9e+24) || ~((l <= 3600000.0)))
		tmp = pi * l;
	else
		tmp = pi * (l - (l / (F * F)));
	end
	tmp_2 = tmp;
end
code[F_, l_] := If[Or[LessEqual[l, -2.9e+24], N[Not[LessEqual[l, 3600000.0]], $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}\;\ell \leq -2.9 \cdot 10^{+24} \lor \neg \left(\ell \leq 3600000\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 l < -2.89999999999999979e24 or 3.6e6 < l

    1. Initial program 62.7%

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

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

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

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

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

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

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

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

    if -2.89999999999999979e24 < l < 3.6e6

    1. Initial program 88.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 73.0% accurate, 2.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -3.5e6 or -1.42000000000000001e-117 < l

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

    if -3.5e6 < l < -1.42000000000000001e-117

    1. Initial program 85.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 73.1% accurate, 2.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < -3.5e6 or -1.8500000000000001e-116 < l

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

    if -3.5e6 < l < -1.8500000000000001e-116

    1. Initial program 85.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{\ell}{{F}^{2}} \cdot \pi} \]
      3. distribute-lft-neg-in56.5%

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

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

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

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

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

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

Alternative 7: 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 75.5%

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

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

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

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

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

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

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

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

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

Reproduce

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