VandenBroeck and Keller, Equation (6)

Percentage Accurate: 76.4% → 99.1%
Time: 19.7s
Alternatives: 7
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 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.4% 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.1% accurate, 0.6× speedup?

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

    1. Initial program 64.5%

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

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

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

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

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

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

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

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

    if -2e16 < (*.f64 (PI.f64) l) < 4e7

    1. Initial program 90.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+16} \lor \neg \left(\pi \cdot \ell \leq 40000000\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 -100000000000 \lor \neg \left(\pi \cdot \ell \leq 40000000\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) -100000000000.0) (not (<= (* PI l) 40000000.0)))
   (* PI l)
   (- (* PI l) (* (/ PI F) (/ l F)))))
double code(double F, double l) {
	double tmp;
	if (((((double) M_PI) * l) <= -100000000000.0) || !((((double) M_PI) * l) <= 40000000.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) <= -100000000000.0) || !((Math.PI * l) <= 40000000.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) <= -100000000000.0) or not ((math.pi * l) <= 40000000.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) <= -100000000000.0) || !(Float64(pi * l) <= 40000000.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) <= -100000000000.0) || ~(((pi * l) <= 40000000.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], -100000000000.0], N[Not[LessEqual[N[(Pi * l), $MachinePrecision], 40000000.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 -100000000000 \lor \neg \left(\pi \cdot \ell \leq 40000000\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) < -1e11 or 4e7 < (*.f64 (PI.f64) l)

    1. Initial program 64.3%

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

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

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

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

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

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

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

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

    if -1e11 < (*.f64 (PI.f64) l) < 4e7

    1. Initial program 90.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 92.8% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq -1450000000 \lor \neg \left(\ell \leq 10^{+15}\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 -1450000000.0) (not (<= l 1e+15)))
   (* PI l)
   (- (* PI l) (* PI (/ l (* F F))))))
double code(double F, double l) {
	double tmp;
	if ((l <= -1450000000.0) || !(l <= 1e+15)) {
		tmp = ((double) M_PI) * l;
	} else {
		tmp = (((double) M_PI) * l) - (((double) M_PI) * (l / (F * F)));
	}
	return tmp;
}
public static double code(double F, double l) {
	double tmp;
	if ((l <= -1450000000.0) || !(l <= 1e+15)) {
		tmp = Math.PI * l;
	} else {
		tmp = (Math.PI * l) - (Math.PI * (l / (F * F)));
	}
	return tmp;
}
def code(F, l):
	tmp = 0
	if (l <= -1450000000.0) or not (l <= 1e+15):
		tmp = math.pi * l
	else:
		tmp = (math.pi * l) - (math.pi * (l / (F * F)))
	return tmp
function code(F, l)
	tmp = 0.0
	if ((l <= -1450000000.0) || !(l <= 1e+15))
		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 <= -1450000000.0) || ~((l <= 1e+15)))
		tmp = pi * l;
	else
		tmp = (pi * l) - (pi * (l / (F * F)));
	end
	tmp_2 = tmp;
end
code[F_, l_] := If[Or[LessEqual[l, -1450000000.0], N[Not[LessEqual[l, 1e+15]], $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 -1450000000 \lor \neg \left(\ell \leq 10^{+15}\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 < -1.45e9 or 1e15 < l

    1. Initial program 64.3%

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

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

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

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

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

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

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

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

    if -1.45e9 < l < 1e15

    1. Initial program 90.6%

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

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

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

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

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

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

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

Alternative 4: 92.5% accurate, 1.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq -1450000000 \lor \neg \left(\ell \leq 10^{+15}\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 -1450000000.0) (not (<= l 1e+15)))
   (* PI l)
   (* l (* PI (- 1.0 (pow F -2.0))))))
double code(double F, double l) {
	double tmp;
	if ((l <= -1450000000.0) || !(l <= 1e+15)) {
		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 <= -1450000000.0) || !(l <= 1e+15)) {
		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 <= -1450000000.0) or not (l <= 1e+15):
		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 <= -1450000000.0) || !(l <= 1e+15))
		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 <= -1450000000.0) || ~((l <= 1e+15)))
		tmp = pi * l;
	else
		tmp = l * (pi * (1.0 - (F ^ -2.0)));
	end
	tmp_2 = tmp;
end
code[F_, l_] := If[Or[LessEqual[l, -1450000000.0], N[Not[LessEqual[l, 1e+15]], $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 -1450000000 \lor \neg \left(\ell \leq 10^{+15}\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 < -1.45e9 or 1e15 < l

    1. Initial program 64.3%

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

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

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

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

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

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

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

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

    if -1.45e9 < l < 1e15

    1. Initial program 90.6%

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

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

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

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

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

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

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

        \[\leadsto \ell \cdot \color{blue}{\left(\pi + \left(-\frac{\pi}{F \cdot F}\right)\right)} \]
      2. distribute-lft-in88.4%

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

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

        \[\leadsto \pi \cdot \ell + \ell \cdot \left(-\color{blue}{\pi \cdot \frac{1}{F \cdot F}}\right) \]
      5. metadata-eval88.4%

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

        \[\leadsto \pi \cdot \ell + \ell \cdot \left(-\pi \cdot \color{blue}{\left(\frac{1}{F} \cdot \frac{1}{F}\right)}\right) \]
      7. distribute-rgt-neg-in88.4%

        \[\leadsto \pi \cdot \ell + \ell \cdot \color{blue}{\left(\pi \cdot \left(-\frac{1}{F} \cdot \frac{1}{F}\right)\right)} \]
      8. inv-pow88.4%

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

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

        \[\leadsto \pi \cdot \ell + \ell \cdot \left(\pi \cdot \left(-\color{blue}{{F}^{\left(-1 + -1\right)}}\right)\right) \]
      11. metadata-eval88.4%

        \[\leadsto \pi \cdot \ell + \ell \cdot \left(\pi \cdot \left(-{F}^{\color{blue}{-2}}\right)\right) \]
    8. Applied egg-rr88.4%

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

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

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

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

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

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

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

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

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

Alternative 5: 73.1% accurate, 2.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\ell \leq -0.008 \lor \neg \left(\ell \leq -3 \cdot 10^{-106} \lor \neg \left(\ell \leq 3.5 \cdot 10^{-138}\right) \land \ell \leq 1.2 \cdot 10^{-27}\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 -0.008)
         (not (or (<= l -3e-106) (and (not (<= l 3.5e-138)) (<= l 1.2e-27)))))
   (* PI l)
   (* PI (/ (- l) (* F F)))))
double code(double F, double l) {
	double tmp;
	if ((l <= -0.008) || !((l <= -3e-106) || (!(l <= 3.5e-138) && (l <= 1.2e-27)))) {
		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 <= -0.008) || !((l <= -3e-106) || (!(l <= 3.5e-138) && (l <= 1.2e-27)))) {
		tmp = Math.PI * l;
	} else {
		tmp = Math.PI * (-l / (F * F));
	}
	return tmp;
}
def code(F, l):
	tmp = 0
	if (l <= -0.008) or not ((l <= -3e-106) or (not (l <= 3.5e-138) and (l <= 1.2e-27))):
		tmp = math.pi * l
	else:
		tmp = math.pi * (-l / (F * F))
	return tmp
function code(F, l)
	tmp = 0.0
	if ((l <= -0.008) || !((l <= -3e-106) || (!(l <= 3.5e-138) && (l <= 1.2e-27))))
		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 <= -0.008) || ~(((l <= -3e-106) || (~((l <= 3.5e-138)) && (l <= 1.2e-27)))))
		tmp = pi * l;
	else
		tmp = pi * (-l / (F * F));
	end
	tmp_2 = tmp;
end
code[F_, l_] := If[Or[LessEqual[l, -0.008], N[Not[Or[LessEqual[l, -3e-106], And[N[Not[LessEqual[l, 3.5e-138]], $MachinePrecision], LessEqual[l, 1.2e-27]]]], $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 -0.008 \lor \neg \left(\ell \leq -3 \cdot 10^{-106} \lor \neg \left(\ell \leq 3.5 \cdot 10^{-138}\right) \land \ell \leq 1.2 \cdot 10^{-27}\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 < -0.0080000000000000002 or -3.00000000000000019e-106 < l < 3.4999999999999999e-138 or 1.20000000000000001e-27 < l

    1. Initial program 74.7%

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

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

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

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

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

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

      \[\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 -0.0080000000000000002 < l < -3.00000000000000019e-106 or 3.4999999999999999e-138 < l < 1.20000000000000001e-27

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -\color{blue}{\frac{\ell}{F \cdot F} \cdot \pi} \]
    11. Applied egg-rr71.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\ell \leq -0.008 \lor \neg \left(\ell \leq -3 \cdot 10^{-106} \lor \neg \left(\ell \leq 3.5 \cdot 10^{-138}\right) \land \ell \leq 1.2 \cdot 10^{-27}\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \frac{-\ell}{F \cdot F}\\ \end{array} \]

Alternative 6: 75.0% accurate, 2.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;F \leq -1.4 \cdot 10^{-27} \lor \neg \left(F \leq -1.15 \cdot 10^{-162}\right) \land \left(F \leq -1.75 \cdot 10^{-205} \lor \neg \left(F \leq 2.5 \cdot 10^{-111}\right)\right):\\
\;\;\;\;\pi \cdot \ell\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if F < -1.4e-27 or -1.1499999999999999e-162 < F < -1.75e-205 or 2.5000000000000001e-111 < F

    1. Initial program 91.9%

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

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

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

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

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

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

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

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

    if -1.4e-27 < F < -1.1499999999999999e-162 or -1.75e-205 < F < 2.5000000000000001e-111

    1. Initial program 55.5%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-\frac{\ell \cdot \pi}{F \cdot F}} \]
    10. Step-by-step derivation
      1. *-commutative52.0%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;F \leq -1.4 \cdot 10^{-27} \lor \neg \left(F \leq -1.15 \cdot 10^{-162}\right) \land \left(F \leq -1.75 \cdot 10^{-205} \lor \neg \left(F \leq 2.5 \cdot 10^{-111}\right)\right):\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{else}:\\ \;\;\;\;\frac{\pi}{F} \cdot \frac{-\ell}{F}\\ \end{array} \]

Alternative 7: 73.2% accurate, 3.0× speedup?

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

\\
\pi \cdot \ell
\end{array}
Derivation
  1. Initial program 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/78.8%

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

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

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

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

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

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

    \[\leadsto \color{blue}{\ell \cdot \pi} \]
  8. Final simplification72.1%

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

Reproduce

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