VandenBroeck and Keller, Equation (6)

Percentage Accurate: 75.4% → 99.3%
Time: 3.4s
Alternatives: 7
Speedup: 2.7×

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}

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: 75.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.3% accurate, 0.9× speedup?

\[\begin{array}{l} l\_m = \left|\ell\right| \\ l\_s = \mathsf{copysign}\left(1, \ell\right) \\ l\_s \cdot \begin{array}{l} \mathbf{if}\;l\_m \leq 2700000000000:\\ \;\;\;\;\pi \cdot l\_m - \frac{\frac{1}{F} \cdot \tan \left(l\_m \cdot \pi\right)}{F}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \pi\\ \end{array} \end{array} \]
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
 :precision binary64
 (*
  l_s
  (if (<= l_m 2700000000000.0)
    (- (* PI l_m) (/ (* (/ 1.0 F) (tan (* l_m PI))) F))
    (* l_m PI))))
l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
	double tmp;
	if (l_m <= 2700000000000.0) {
		tmp = (((double) M_PI) * l_m) - (((1.0 / F) * tan((l_m * ((double) M_PI)))) / F);
	} else {
		tmp = l_m * ((double) M_PI);
	}
	return l_s * tmp;
}
l\_m = Math.abs(l);
l\_s = Math.copySign(1.0, l);
public static double code(double l_s, double F, double l_m) {
	double tmp;
	if (l_m <= 2700000000000.0) {
		tmp = (Math.PI * l_m) - (((1.0 / F) * Math.tan((l_m * Math.PI))) / F);
	} else {
		tmp = l_m * Math.PI;
	}
	return l_s * tmp;
}
l\_m = math.fabs(l)
l\_s = math.copysign(1.0, l)
def code(l_s, F, l_m):
	tmp = 0
	if l_m <= 2700000000000.0:
		tmp = (math.pi * l_m) - (((1.0 / F) * math.tan((l_m * math.pi))) / F)
	else:
		tmp = l_m * math.pi
	return l_s * tmp
l\_m = abs(l)
l\_s = copysign(1.0, l)
function code(l_s, F, l_m)
	tmp = 0.0
	if (l_m <= 2700000000000.0)
		tmp = Float64(Float64(pi * l_m) - Float64(Float64(Float64(1.0 / F) * tan(Float64(l_m * pi))) / F));
	else
		tmp = Float64(l_m * pi);
	end
	return Float64(l_s * tmp)
end
l\_m = abs(l);
l\_s = sign(l) * abs(1.0);
function tmp_2 = code(l_s, F, l_m)
	tmp = 0.0;
	if (l_m <= 2700000000000.0)
		tmp = (pi * l_m) - (((1.0 / F) * tan((l_m * pi))) / F);
	else
		tmp = l_m * pi;
	end
	tmp_2 = l_s * tmp;
end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := N[(l$95$s * If[LessEqual[l$95$m, 2700000000000.0], N[(N[(Pi * l$95$m), $MachinePrecision] - N[(N[(N[(1.0 / F), $MachinePrecision] * N[Tan[N[(l$95$m * Pi), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], N[(l$95$m * Pi), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)

\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;l\_m \leq 2700000000000:\\
\;\;\;\;\pi \cdot l\_m - \frac{\frac{1}{F} \cdot \tan \left(l\_m \cdot \pi\right)}{F}\\

\mathbf{else}:\\
\;\;\;\;l\_m \cdot \pi\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 2.7e12

    1. Initial program 75.4%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\tan \left(\pi \cdot \ell\right) \cdot \frac{1}{F \cdot F}} \]
      3. lift-/.f64N/A

        \[\leadsto \pi \cdot \ell - \tan \left(\pi \cdot \ell\right) \cdot \color{blue}{\frac{1}{F \cdot F}} \]
      4. mult-flip-revN/A

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
      5. lift-*.f64N/A

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
      7. lower-/.f64N/A

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
      8. lower-/.f6481.2

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}}{F} \]
      9. lift-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \color{blue}{\left(\pi \cdot \ell\right)}}{F}}{F} \]
      10. *-commutativeN/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \color{blue}{\left(\ell \cdot \pi\right)}}{F}}{F} \]
      11. lower-*.f6481.2

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

      \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\ell \cdot \pi\right)}{F}}{F}} \]
    4. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{\tan \left(\ell \cdot \pi\right)}{F}}}{F} \]
      2. mult-flipN/A

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\tan \left(\ell \cdot \pi\right) \cdot \frac{1}{F}}}{F} \]
      3. *-commutativeN/A

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{1}{F} \cdot \tan \left(\ell \cdot \pi\right)}}{F} \]
      4. lower-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{1}{F} \cdot \tan \left(\ell \cdot \pi\right)}}{F} \]
      5. lower-/.f6481.2

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

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

    if 2.7e12 < l

    1. Initial program 75.4%

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

      \[\leadsto \color{blue}{\ell \cdot \mathsf{PI}\left(\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \ell \cdot \color{blue}{\mathsf{PI}\left(\right)} \]
      2. lower-PI.f6473.9

        \[\leadsto \ell \cdot \pi \]
    4. Applied rewrites73.9%

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

Alternative 2: 99.3% accurate, 1.0× speedup?

\[\begin{array}{l} l\_m = \left|\ell\right| \\ l\_s = \mathsf{copysign}\left(1, \ell\right) \\ l\_s \cdot \begin{array}{l} \mathbf{if}\;l\_m \leq 2700000000000:\\ \;\;\;\;\pi \cdot l\_m - \frac{\frac{\tan \left(l\_m \cdot \pi\right)}{F}}{F}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \pi\\ \end{array} \end{array} \]
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
 :precision binary64
 (*
  l_s
  (if (<= l_m 2700000000000.0)
    (- (* PI l_m) (/ (/ (tan (* l_m PI)) F) F))
    (* l_m PI))))
l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
	double tmp;
	if (l_m <= 2700000000000.0) {
		tmp = (((double) M_PI) * l_m) - ((tan((l_m * ((double) M_PI))) / F) / F);
	} else {
		tmp = l_m * ((double) M_PI);
	}
	return l_s * tmp;
}
l\_m = Math.abs(l);
l\_s = Math.copySign(1.0, l);
public static double code(double l_s, double F, double l_m) {
	double tmp;
	if (l_m <= 2700000000000.0) {
		tmp = (Math.PI * l_m) - ((Math.tan((l_m * Math.PI)) / F) / F);
	} else {
		tmp = l_m * Math.PI;
	}
	return l_s * tmp;
}
l\_m = math.fabs(l)
l\_s = math.copysign(1.0, l)
def code(l_s, F, l_m):
	tmp = 0
	if l_m <= 2700000000000.0:
		tmp = (math.pi * l_m) - ((math.tan((l_m * math.pi)) / F) / F)
	else:
		tmp = l_m * math.pi
	return l_s * tmp
l\_m = abs(l)
l\_s = copysign(1.0, l)
function code(l_s, F, l_m)
	tmp = 0.0
	if (l_m <= 2700000000000.0)
		tmp = Float64(Float64(pi * l_m) - Float64(Float64(tan(Float64(l_m * pi)) / F) / F));
	else
		tmp = Float64(l_m * pi);
	end
	return Float64(l_s * tmp)
end
l\_m = abs(l);
l\_s = sign(l) * abs(1.0);
function tmp_2 = code(l_s, F, l_m)
	tmp = 0.0;
	if (l_m <= 2700000000000.0)
		tmp = (pi * l_m) - ((tan((l_m * pi)) / F) / F);
	else
		tmp = l_m * pi;
	end
	tmp_2 = l_s * tmp;
end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := N[(l$95$s * If[LessEqual[l$95$m, 2700000000000.0], N[(N[(Pi * l$95$m), $MachinePrecision] - N[(N[(N[Tan[N[(l$95$m * Pi), $MachinePrecision]], $MachinePrecision] / F), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], N[(l$95$m * Pi), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)

\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;l\_m \leq 2700000000000:\\
\;\;\;\;\pi \cdot l\_m - \frac{\frac{\tan \left(l\_m \cdot \pi\right)}{F}}{F}\\

\mathbf{else}:\\
\;\;\;\;l\_m \cdot \pi\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 2.7e12

    1. Initial program 75.4%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\tan \left(\pi \cdot \ell\right) \cdot \frac{1}{F \cdot F}} \]
      3. lift-/.f64N/A

        \[\leadsto \pi \cdot \ell - \tan \left(\pi \cdot \ell\right) \cdot \color{blue}{\frac{1}{F \cdot F}} \]
      4. mult-flip-revN/A

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
      5. lift-*.f64N/A

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
      7. lower-/.f64N/A

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
      8. lower-/.f6481.2

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}}{F} \]
      9. lift-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \color{blue}{\left(\pi \cdot \ell\right)}}{F}}{F} \]
      10. *-commutativeN/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \color{blue}{\left(\ell \cdot \pi\right)}}{F}}{F} \]
      11. lower-*.f6481.2

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

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

    if 2.7e12 < l

    1. Initial program 75.4%

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

      \[\leadsto \color{blue}{\ell \cdot \mathsf{PI}\left(\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \ell \cdot \color{blue}{\mathsf{PI}\left(\right)} \]
      2. lower-PI.f6473.9

        \[\leadsto \ell \cdot \pi \]
    4. Applied rewrites73.9%

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

Alternative 3: 98.5% accurate, 2.3× speedup?

\[\begin{array}{l} l\_m = \left|\ell\right| \\ l\_s = \mathsf{copysign}\left(1, \ell\right) \\ l\_s \cdot \begin{array}{l} \mathbf{if}\;l\_m \leq 650000000000:\\ \;\;\;\;\pi \cdot l\_m - \frac{\frac{1}{F} \cdot \left(l\_m \cdot \pi\right)}{F}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \pi\\ \end{array} \end{array} \]
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
 :precision binary64
 (*
  l_s
  (if (<= l_m 650000000000.0)
    (- (* PI l_m) (/ (* (/ 1.0 F) (* l_m PI)) F))
    (* l_m PI))))
l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
	double tmp;
	if (l_m <= 650000000000.0) {
		tmp = (((double) M_PI) * l_m) - (((1.0 / F) * (l_m * ((double) M_PI))) / F);
	} else {
		tmp = l_m * ((double) M_PI);
	}
	return l_s * tmp;
}
l\_m = Math.abs(l);
l\_s = Math.copySign(1.0, l);
public static double code(double l_s, double F, double l_m) {
	double tmp;
	if (l_m <= 650000000000.0) {
		tmp = (Math.PI * l_m) - (((1.0 / F) * (l_m * Math.PI)) / F);
	} else {
		tmp = l_m * Math.PI;
	}
	return l_s * tmp;
}
l\_m = math.fabs(l)
l\_s = math.copysign(1.0, l)
def code(l_s, F, l_m):
	tmp = 0
	if l_m <= 650000000000.0:
		tmp = (math.pi * l_m) - (((1.0 / F) * (l_m * math.pi)) / F)
	else:
		tmp = l_m * math.pi
	return l_s * tmp
l\_m = abs(l)
l\_s = copysign(1.0, l)
function code(l_s, F, l_m)
	tmp = 0.0
	if (l_m <= 650000000000.0)
		tmp = Float64(Float64(pi * l_m) - Float64(Float64(Float64(1.0 / F) * Float64(l_m * pi)) / F));
	else
		tmp = Float64(l_m * pi);
	end
	return Float64(l_s * tmp)
end
l\_m = abs(l);
l\_s = sign(l) * abs(1.0);
function tmp_2 = code(l_s, F, l_m)
	tmp = 0.0;
	if (l_m <= 650000000000.0)
		tmp = (pi * l_m) - (((1.0 / F) * (l_m * pi)) / F);
	else
		tmp = l_m * pi;
	end
	tmp_2 = l_s * tmp;
end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := N[(l$95$s * If[LessEqual[l$95$m, 650000000000.0], N[(N[(Pi * l$95$m), $MachinePrecision] - N[(N[(N[(1.0 / F), $MachinePrecision] * N[(l$95$m * Pi), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], N[(l$95$m * Pi), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)

\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;l\_m \leq 650000000000:\\
\;\;\;\;\pi \cdot l\_m - \frac{\frac{1}{F} \cdot \left(l\_m \cdot \pi\right)}{F}\\

\mathbf{else}:\\
\;\;\;\;l\_m \cdot \pi\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 6.5e11

    1. Initial program 75.4%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\tan \left(\pi \cdot \ell\right) \cdot \frac{1}{F \cdot F}} \]
      3. lift-/.f64N/A

        \[\leadsto \pi \cdot \ell - \tan \left(\pi \cdot \ell\right) \cdot \color{blue}{\frac{1}{F \cdot F}} \]
      4. mult-flip-revN/A

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
      5. lift-*.f64N/A

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
      7. lower-/.f64N/A

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
      8. lower-/.f6481.2

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}}{F} \]
      9. lift-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \color{blue}{\left(\pi \cdot \ell\right)}}{F}}{F} \]
      10. *-commutativeN/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \color{blue}{\left(\ell \cdot \pi\right)}}{F}}{F} \]
      11. lower-*.f6481.2

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

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

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{\ell \cdot \mathsf{PI}\left(\right)}{F}}}{F} \]
    5. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\ell \cdot \mathsf{PI}\left(\right)}{\color{blue}{F}}}{F} \]
      2. lower-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\ell \cdot \mathsf{PI}\left(\right)}{F}}{F} \]
      3. lower-PI.f6473.9

        \[\leadsto \pi \cdot \ell - \frac{\frac{\ell \cdot \pi}{F}}{F} \]
    6. Applied rewrites73.9%

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{\ell \cdot \pi}{F}}}{F} \]
    7. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\ell \cdot \pi}{\color{blue}{F}}}{F} \]
      2. mult-flipN/A

        \[\leadsto \pi \cdot \ell - \frac{\left(\ell \cdot \pi\right) \cdot \color{blue}{\frac{1}{F}}}{F} \]
      3. lift-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\left(\ell \cdot \pi\right) \cdot \frac{\color{blue}{1}}{F}}{F} \]
      4. *-commutativeN/A

        \[\leadsto \pi \cdot \ell - \frac{\left(\pi \cdot \ell\right) \cdot \frac{\color{blue}{1}}{F}}{F} \]
      5. lift-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\left(\pi \cdot \ell\right) \cdot \frac{\color{blue}{1}}{F}}{F} \]
      6. lift-/.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\left(\pi \cdot \ell\right) \cdot \frac{1}{\color{blue}{F}}}{F} \]
      7. *-commutativeN/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{1}{F} \cdot \color{blue}{\left(\pi \cdot \ell\right)}}{F} \]
      8. lower-*.f6473.9

        \[\leadsto \pi \cdot \ell - \frac{\frac{1}{F} \cdot \color{blue}{\left(\pi \cdot \ell\right)}}{F} \]
      9. lift-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{1}{F} \cdot \left(\pi \cdot \color{blue}{\ell}\right)}{F} \]
      10. *-commutativeN/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{1}{F} \cdot \left(\ell \cdot \color{blue}{\pi}\right)}{F} \]
      11. lift-*.f6473.9

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

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

    if 6.5e11 < l

    1. Initial program 75.4%

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

      \[\leadsto \color{blue}{\ell \cdot \mathsf{PI}\left(\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \ell \cdot \color{blue}{\mathsf{PI}\left(\right)} \]
      2. lower-PI.f6473.9

        \[\leadsto \ell \cdot \pi \]
    4. Applied rewrites73.9%

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

Alternative 4: 98.5% accurate, 2.7× speedup?

\[\begin{array}{l} l\_m = \left|\ell\right| \\ l\_s = \mathsf{copysign}\left(1, \ell\right) \\ l\_s \cdot \begin{array}{l} \mathbf{if}\;l\_m \leq 650000000000:\\ \;\;\;\;\pi \cdot l\_m - \frac{\frac{\pi}{F} \cdot l\_m}{F}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \pi\\ \end{array} \end{array} \]
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
 :precision binary64
 (*
  l_s
  (if (<= l_m 650000000000.0)
    (- (* PI l_m) (/ (* (/ PI F) l_m) F))
    (* l_m PI))))
l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
	double tmp;
	if (l_m <= 650000000000.0) {
		tmp = (((double) M_PI) * l_m) - (((((double) M_PI) / F) * l_m) / F);
	} else {
		tmp = l_m * ((double) M_PI);
	}
	return l_s * tmp;
}
l\_m = Math.abs(l);
l\_s = Math.copySign(1.0, l);
public static double code(double l_s, double F, double l_m) {
	double tmp;
	if (l_m <= 650000000000.0) {
		tmp = (Math.PI * l_m) - (((Math.PI / F) * l_m) / F);
	} else {
		tmp = l_m * Math.PI;
	}
	return l_s * tmp;
}
l\_m = math.fabs(l)
l\_s = math.copysign(1.0, l)
def code(l_s, F, l_m):
	tmp = 0
	if l_m <= 650000000000.0:
		tmp = (math.pi * l_m) - (((math.pi / F) * l_m) / F)
	else:
		tmp = l_m * math.pi
	return l_s * tmp
l\_m = abs(l)
l\_s = copysign(1.0, l)
function code(l_s, F, l_m)
	tmp = 0.0
	if (l_m <= 650000000000.0)
		tmp = Float64(Float64(pi * l_m) - Float64(Float64(Float64(pi / F) * l_m) / F));
	else
		tmp = Float64(l_m * pi);
	end
	return Float64(l_s * tmp)
end
l\_m = abs(l);
l\_s = sign(l) * abs(1.0);
function tmp_2 = code(l_s, F, l_m)
	tmp = 0.0;
	if (l_m <= 650000000000.0)
		tmp = (pi * l_m) - (((pi / F) * l_m) / F);
	else
		tmp = l_m * pi;
	end
	tmp_2 = l_s * tmp;
end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := N[(l$95$s * If[LessEqual[l$95$m, 650000000000.0], N[(N[(Pi * l$95$m), $MachinePrecision] - N[(N[(N[(Pi / F), $MachinePrecision] * l$95$m), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], N[(l$95$m * Pi), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)

\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;l\_m \leq 650000000000:\\
\;\;\;\;\pi \cdot l\_m - \frac{\frac{\pi}{F} \cdot l\_m}{F}\\

\mathbf{else}:\\
\;\;\;\;l\_m \cdot \pi\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 6.5e11

    1. Initial program 75.4%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\tan \left(\pi \cdot \ell\right) \cdot \frac{1}{F \cdot F}} \]
      3. lift-/.f64N/A

        \[\leadsto \pi \cdot \ell - \tan \left(\pi \cdot \ell\right) \cdot \color{blue}{\frac{1}{F \cdot F}} \]
      4. mult-flip-revN/A

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
      5. lift-*.f64N/A

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
      7. lower-/.f64N/A

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
      8. lower-/.f6481.2

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}}{F} \]
      9. lift-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \color{blue}{\left(\pi \cdot \ell\right)}}{F}}{F} \]
      10. *-commutativeN/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \color{blue}{\left(\ell \cdot \pi\right)}}{F}}{F} \]
      11. lower-*.f6481.2

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

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

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{\ell \cdot \mathsf{PI}\left(\right)}{F}}}{F} \]
    5. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\ell \cdot \mathsf{PI}\left(\right)}{\color{blue}{F}}}{F} \]
      2. lower-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\ell \cdot \mathsf{PI}\left(\right)}{F}}{F} \]
      3. lower-PI.f6473.9

        \[\leadsto \pi \cdot \ell - \frac{\frac{\ell \cdot \pi}{F}}{F} \]
    6. Applied rewrites73.9%

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{\ell \cdot \pi}{F}}}{F} \]
    7. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\ell \cdot \pi}{\color{blue}{F}}}{F} \]
      2. lift-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\ell \cdot \pi}{F}}{F} \]
      3. associate-/l*N/A

        \[\leadsto \pi \cdot \ell - \frac{\ell \cdot \color{blue}{\frac{\pi}{F}}}{F} \]
      4. *-commutativeN/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\pi}{F} \cdot \color{blue}{\ell}}{F} \]
      5. lower-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\pi}{F} \cdot \color{blue}{\ell}}{F} \]
      6. lower-/.f6474.0

        \[\leadsto \pi \cdot \ell - \frac{\frac{\pi}{F} \cdot \ell}{F} \]
    8. Applied rewrites74.0%

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

    if 6.5e11 < l

    1. Initial program 75.4%

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

      \[\leadsto \color{blue}{\ell \cdot \mathsf{PI}\left(\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \ell \cdot \color{blue}{\mathsf{PI}\left(\right)} \]
      2. lower-PI.f6473.9

        \[\leadsto \ell \cdot \pi \]
    4. Applied rewrites73.9%

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

Alternative 5: 98.5% accurate, 2.7× speedup?

\[\begin{array}{l} l\_m = \left|\ell\right| \\ l\_s = \mathsf{copysign}\left(1, \ell\right) \\ l\_s \cdot \begin{array}{l} \mathbf{if}\;l\_m \leq 650000000000:\\ \;\;\;\;\pi \cdot l\_m - \frac{\pi \cdot \frac{l\_m}{F}}{F}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \pi\\ \end{array} \end{array} \]
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
 :precision binary64
 (*
  l_s
  (if (<= l_m 650000000000.0)
    (- (* PI l_m) (/ (* PI (/ l_m F)) F))
    (* l_m PI))))
l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
	double tmp;
	if (l_m <= 650000000000.0) {
		tmp = (((double) M_PI) * l_m) - ((((double) M_PI) * (l_m / F)) / F);
	} else {
		tmp = l_m * ((double) M_PI);
	}
	return l_s * tmp;
}
l\_m = Math.abs(l);
l\_s = Math.copySign(1.0, l);
public static double code(double l_s, double F, double l_m) {
	double tmp;
	if (l_m <= 650000000000.0) {
		tmp = (Math.PI * l_m) - ((Math.PI * (l_m / F)) / F);
	} else {
		tmp = l_m * Math.PI;
	}
	return l_s * tmp;
}
l\_m = math.fabs(l)
l\_s = math.copysign(1.0, l)
def code(l_s, F, l_m):
	tmp = 0
	if l_m <= 650000000000.0:
		tmp = (math.pi * l_m) - ((math.pi * (l_m / F)) / F)
	else:
		tmp = l_m * math.pi
	return l_s * tmp
l\_m = abs(l)
l\_s = copysign(1.0, l)
function code(l_s, F, l_m)
	tmp = 0.0
	if (l_m <= 650000000000.0)
		tmp = Float64(Float64(pi * l_m) - Float64(Float64(pi * Float64(l_m / F)) / F));
	else
		tmp = Float64(l_m * pi);
	end
	return Float64(l_s * tmp)
end
l\_m = abs(l);
l\_s = sign(l) * abs(1.0);
function tmp_2 = code(l_s, F, l_m)
	tmp = 0.0;
	if (l_m <= 650000000000.0)
		tmp = (pi * l_m) - ((pi * (l_m / F)) / F);
	else
		tmp = l_m * pi;
	end
	tmp_2 = l_s * tmp;
end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := N[(l$95$s * If[LessEqual[l$95$m, 650000000000.0], N[(N[(Pi * l$95$m), $MachinePrecision] - N[(N[(Pi * N[(l$95$m / F), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision]), $MachinePrecision], N[(l$95$m * Pi), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)

\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;l\_m \leq 650000000000:\\
\;\;\;\;\pi \cdot l\_m - \frac{\pi \cdot \frac{l\_m}{F}}{F}\\

\mathbf{else}:\\
\;\;\;\;l\_m \cdot \pi\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if l < 6.5e11

    1. Initial program 75.4%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\tan \left(\pi \cdot \ell\right) \cdot \frac{1}{F \cdot F}} \]
      3. lift-/.f64N/A

        \[\leadsto \pi \cdot \ell - \tan \left(\pi \cdot \ell\right) \cdot \color{blue}{\frac{1}{F \cdot F}} \]
      4. mult-flip-revN/A

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}} \]
      5. lift-*.f64N/A

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

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
      7. lower-/.f64N/A

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
      8. lower-/.f6481.2

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{\tan \left(\pi \cdot \ell\right)}{F}}}{F} \]
      9. lift-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \color{blue}{\left(\pi \cdot \ell\right)}}{F}}{F} \]
      10. *-commutativeN/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \color{blue}{\left(\ell \cdot \pi\right)}}{F}}{F} \]
      11. lower-*.f6481.2

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

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

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{\ell \cdot \mathsf{PI}\left(\right)}{F}}}{F} \]
    5. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\ell \cdot \mathsf{PI}\left(\right)}{\color{blue}{F}}}{F} \]
      2. lower-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\ell \cdot \mathsf{PI}\left(\right)}{F}}{F} \]
      3. lower-PI.f6473.9

        \[\leadsto \pi \cdot \ell - \frac{\frac{\ell \cdot \pi}{F}}{F} \]
    6. Applied rewrites73.9%

      \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{\ell \cdot \pi}{F}}}{F} \]
    7. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\ell \cdot \pi}{\color{blue}{F}}}{F} \]
      2. frac-2negN/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\mathsf{neg}\left(\ell \cdot \pi\right)}{\color{blue}{\mathsf{neg}\left(F\right)}}}{F} \]
      3. lift-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\mathsf{neg}\left(\ell \cdot \pi\right)}{\mathsf{neg}\left(F\right)}}{F} \]
      4. distribute-lft-neg-outN/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\left(\mathsf{neg}\left(\ell\right)\right) \cdot \pi}{\mathsf{neg}\left(\color{blue}{F}\right)}}{F} \]
      5. lift-neg.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\left(-\ell\right) \cdot \pi}{\mathsf{neg}\left(F\right)}}{F} \]
      6. *-commutativeN/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\pi \cdot \left(-\ell\right)}{\mathsf{neg}\left(\color{blue}{F}\right)}}{F} \]
      7. associate-/l*N/A

        \[\leadsto \pi \cdot \ell - \frac{\pi \cdot \color{blue}{\frac{-\ell}{\mathsf{neg}\left(F\right)}}}{F} \]
      8. lower-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\pi \cdot \color{blue}{\frac{-\ell}{\mathsf{neg}\left(F\right)}}}{F} \]
      9. lift-neg.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\pi \cdot \frac{\mathsf{neg}\left(\ell\right)}{\mathsf{neg}\left(\color{blue}{F}\right)}}{F} \]
      10. frac-2neg-revN/A

        \[\leadsto \pi \cdot \ell - \frac{\pi \cdot \frac{\ell}{\color{blue}{F}}}{F} \]
      11. lower-/.f6474.0

        \[\leadsto \pi \cdot \ell - \frac{\pi \cdot \frac{\ell}{\color{blue}{F}}}{F} \]
    8. Applied rewrites74.0%

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

    if 6.5e11 < l

    1. Initial program 75.4%

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

      \[\leadsto \color{blue}{\ell \cdot \mathsf{PI}\left(\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \ell \cdot \color{blue}{\mathsf{PI}\left(\right)} \]
      2. lower-PI.f6473.9

        \[\leadsto \ell \cdot \pi \]
    4. Applied rewrites73.9%

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

Alternative 6: 83.2% accurate, 0.4× speedup?

\[\begin{array}{l} l\_m = \left|\ell\right| \\ l\_s = \mathsf{copysign}\left(1, \ell\right) \\ \begin{array}{l} t_0 := \pi \cdot l\_m - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot l\_m\right)\\ l\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -4 \cdot 10^{+169}:\\ \;\;\;\;\frac{F \cdot \left(l\_m \cdot \pi\right)}{F}\\ \mathbf{elif}\;t\_0 \leq -1 \cdot 10^{-259}:\\ \;\;\;\;1 \cdot \frac{-1 \cdot \left(l\_m \cdot \pi\right)}{F \cdot F}\\ \mathbf{else}:\\ \;\;\;\;l\_m \cdot \pi\\ \end{array} \end{array} \end{array} \]
l\_m = (fabs.f64 l)
l\_s = (copysign.f64 #s(literal 1 binary64) l)
(FPCore (l_s F l_m)
 :precision binary64
 (let* ((t_0 (- (* PI l_m) (* (/ 1.0 (* F F)) (tan (* PI l_m))))))
   (*
    l_s
    (if (<= t_0 -4e+169)
      (/ (* F (* l_m PI)) F)
      (if (<= t_0 -1e-259)
        (* 1.0 (/ (* -1.0 (* l_m PI)) (* F F)))
        (* l_m PI))))))
l\_m = fabs(l);
l\_s = copysign(1.0, l);
double code(double l_s, double F, double l_m) {
	double t_0 = (((double) M_PI) * l_m) - ((1.0 / (F * F)) * tan((((double) M_PI) * l_m)));
	double tmp;
	if (t_0 <= -4e+169) {
		tmp = (F * (l_m * ((double) M_PI))) / F;
	} else if (t_0 <= -1e-259) {
		tmp = 1.0 * ((-1.0 * (l_m * ((double) M_PI))) / (F * F));
	} else {
		tmp = l_m * ((double) M_PI);
	}
	return l_s * tmp;
}
l\_m = Math.abs(l);
l\_s = Math.copySign(1.0, l);
public static double code(double l_s, double F, double l_m) {
	double t_0 = (Math.PI * l_m) - ((1.0 / (F * F)) * Math.tan((Math.PI * l_m)));
	double tmp;
	if (t_0 <= -4e+169) {
		tmp = (F * (l_m * Math.PI)) / F;
	} else if (t_0 <= -1e-259) {
		tmp = 1.0 * ((-1.0 * (l_m * Math.PI)) / (F * F));
	} else {
		tmp = l_m * Math.PI;
	}
	return l_s * tmp;
}
l\_m = math.fabs(l)
l\_s = math.copysign(1.0, l)
def code(l_s, F, l_m):
	t_0 = (math.pi * l_m) - ((1.0 / (F * F)) * math.tan((math.pi * l_m)))
	tmp = 0
	if t_0 <= -4e+169:
		tmp = (F * (l_m * math.pi)) / F
	elif t_0 <= -1e-259:
		tmp = 1.0 * ((-1.0 * (l_m * math.pi)) / (F * F))
	else:
		tmp = l_m * math.pi
	return l_s * tmp
l\_m = abs(l)
l\_s = copysign(1.0, l)
function code(l_s, F, l_m)
	t_0 = Float64(Float64(pi * l_m) - Float64(Float64(1.0 / Float64(F * F)) * tan(Float64(pi * l_m))))
	tmp = 0.0
	if (t_0 <= -4e+169)
		tmp = Float64(Float64(F * Float64(l_m * pi)) / F);
	elseif (t_0 <= -1e-259)
		tmp = Float64(1.0 * Float64(Float64(-1.0 * Float64(l_m * pi)) / Float64(F * F)));
	else
		tmp = Float64(l_m * pi);
	end
	return Float64(l_s * tmp)
end
l\_m = abs(l);
l\_s = sign(l) * abs(1.0);
function tmp_2 = code(l_s, F, l_m)
	t_0 = (pi * l_m) - ((1.0 / (F * F)) * tan((pi * l_m)));
	tmp = 0.0;
	if (t_0 <= -4e+169)
		tmp = (F * (l_m * pi)) / F;
	elseif (t_0 <= -1e-259)
		tmp = 1.0 * ((-1.0 * (l_m * pi)) / (F * F));
	else
		tmp = l_m * pi;
	end
	tmp_2 = l_s * tmp;
end
l\_m = N[Abs[l], $MachinePrecision]
l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
code[l$95$s_, F_, l$95$m_] := Block[{t$95$0 = N[(N[(Pi * l$95$m), $MachinePrecision] - N[(N[(1.0 / N[(F * F), $MachinePrecision]), $MachinePrecision] * N[Tan[N[(Pi * l$95$m), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(l$95$s * If[LessEqual[t$95$0, -4e+169], N[(N[(F * N[(l$95$m * Pi), $MachinePrecision]), $MachinePrecision] / F), $MachinePrecision], If[LessEqual[t$95$0, -1e-259], N[(1.0 * N[(N[(-1.0 * N[(l$95$m * Pi), $MachinePrecision]), $MachinePrecision] / N[(F * F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(l$95$m * Pi), $MachinePrecision]]]), $MachinePrecision]]
\begin{array}{l}
l\_m = \left|\ell\right|
\\
l\_s = \mathsf{copysign}\left(1, \ell\right)

\\
\begin{array}{l}
t_0 := \pi \cdot l\_m - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot l\_m\right)\\
l\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -4 \cdot 10^{+169}:\\
\;\;\;\;\frac{F \cdot \left(l\_m \cdot \pi\right)}{F}\\

\mathbf{elif}\;t\_0 \leq -1 \cdot 10^{-259}:\\
\;\;\;\;1 \cdot \frac{-1 \cdot \left(l\_m \cdot \pi\right)}{F \cdot F}\\

\mathbf{else}:\\
\;\;\;\;l\_m \cdot \pi\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (-.f64 (*.f64 (PI.f64) l) (*.f64 (/.f64 #s(literal 1 binary64) (*.f64 F F)) (tan.f64 (*.f64 (PI.f64) l)))) < -3.99999999999999974e169

    1. Initial program 75.4%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)} \]
      2. lift-/.f64N/A

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1}{F \cdot F}} \cdot \tan \left(\pi \cdot \ell\right) \]
      3. lift-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{1}{\color{blue}{F \cdot F}} \cdot \tan \left(\pi \cdot \ell\right) \]
      4. sqr-neg-revN/A

        \[\leadsto \pi \cdot \ell - \frac{1}{\color{blue}{\left(\mathsf{neg}\left(F\right)\right) \cdot \left(\mathsf{neg}\left(F\right)\right)}} \cdot \tan \left(\pi \cdot \ell\right) \]
      5. associate-/r*N/A

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{1}{\mathsf{neg}\left(F\right)}}{\mathsf{neg}\left(F\right)}} \cdot \tan \left(\pi \cdot \ell\right) \]
      6. associate-*l/N/A

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{1}{\mathsf{neg}\left(F\right)} \cdot \tan \left(\pi \cdot \ell\right)}{\mathsf{neg}\left(F\right)}} \]
      7. lower-/.f64N/A

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{1}{\mathsf{neg}\left(F\right)} \cdot \tan \left(\pi \cdot \ell\right)}{\mathsf{neg}\left(F\right)}} \]
      8. lower-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{1}{\mathsf{neg}\left(F\right)} \cdot \tan \left(\pi \cdot \ell\right)}}{\mathsf{neg}\left(F\right)} \]
      9. metadata-evalN/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\mathsf{neg}\left(F\right)} \cdot \tan \left(\pi \cdot \ell\right)}{\mathsf{neg}\left(F\right)} \]
      10. frac-2neg-revN/A

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{-1}{F}} \cdot \tan \left(\pi \cdot \ell\right)}{\mathsf{neg}\left(F\right)} \]
      11. lower-/.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\color{blue}{\frac{-1}{F}} \cdot \tan \left(\pi \cdot \ell\right)}{\mathsf{neg}\left(F\right)} \]
      12. lift-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{-1}{F} \cdot \tan \color{blue}{\left(\pi \cdot \ell\right)}}{\mathsf{neg}\left(F\right)} \]
      13. *-commutativeN/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{-1}{F} \cdot \tan \color{blue}{\left(\ell \cdot \pi\right)}}{\mathsf{neg}\left(F\right)} \]
      14. lower-*.f64N/A

        \[\leadsto \pi \cdot \ell - \frac{\frac{-1}{F} \cdot \tan \color{blue}{\left(\ell \cdot \pi\right)}}{\mathsf{neg}\left(F\right)} \]
      15. lower-neg.f6481.2

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

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

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

      \[\leadsto \frac{\color{blue}{F \cdot \left(\ell \cdot \mathsf{PI}\left(\right)\right)}}{F} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \frac{F \cdot \color{blue}{\left(\ell \cdot \mathsf{PI}\left(\right)\right)}}{F} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{F \cdot \left(\ell \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}{F} \]
      3. lower-PI.f6461.8

        \[\leadsto \frac{F \cdot \left(\ell \cdot \pi\right)}{F} \]
    7. Applied rewrites61.8%

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

    if -3.99999999999999974e169 < (-.f64 (*.f64 (PI.f64) l) (*.f64 (/.f64 #s(literal 1 binary64) (*.f64 F F)) (tan.f64 (*.f64 (PI.f64) l)))) < -1.0000000000000001e-259

    1. Initial program 75.4%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Step-by-step derivation
      1. lift--.f64N/A

        \[\leadsto \color{blue}{\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)} \]
      2. lift-*.f64N/A

        \[\leadsto \pi \cdot \ell - \color{blue}{\frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)} \]
      3. fp-cancel-sub-sign-invN/A

        \[\leadsto \color{blue}{\pi \cdot \ell + \left(\mathsf{neg}\left(\frac{1}{F \cdot F}\right)\right) \cdot \tan \left(\pi \cdot \ell\right)} \]
      4. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(\frac{1}{F \cdot F}\right)\right) \cdot \tan \left(\pi \cdot \ell\right) + \pi \cdot \ell} \]
      5. sum-to-multN/A

        \[\leadsto \color{blue}{\left(1 + \frac{\pi \cdot \ell}{\left(\mathsf{neg}\left(\frac{1}{F \cdot F}\right)\right) \cdot \tan \left(\pi \cdot \ell\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\frac{1}{F \cdot F}\right)\right) \cdot \tan \left(\pi \cdot \ell\right)\right)} \]
      6. lower-unsound-*.f64N/A

        \[\leadsto \color{blue}{\left(1 + \frac{\pi \cdot \ell}{\left(\mathsf{neg}\left(\frac{1}{F \cdot F}\right)\right) \cdot \tan \left(\pi \cdot \ell\right)}\right) \cdot \left(\left(\mathsf{neg}\left(\frac{1}{F \cdot F}\right)\right) \cdot \tan \left(\pi \cdot \ell\right)\right)} \]
    3. Applied rewrites39.5%

      \[\leadsto \color{blue}{\left(1 + \frac{\ell \cdot \pi}{\frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F}}\right) \cdot \frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F}} \]
    4. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \color{blue}{\left(1 + \frac{\ell \cdot \pi}{\frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F}}\right)} \cdot \frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F} \]
      2. +-commutativeN/A

        \[\leadsto \color{blue}{\left(\frac{\ell \cdot \pi}{\frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F}} + 1\right)} \cdot \frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F} \]
      3. lift-/.f64N/A

        \[\leadsto \left(\color{blue}{\frac{\ell \cdot \pi}{\frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F}}} + 1\right) \cdot \frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F} \]
      4. lift-/.f64N/A

        \[\leadsto \left(\frac{\ell \cdot \pi}{\color{blue}{\frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F}}} + 1\right) \cdot \frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F} \]
      5. associate-/r/N/A

        \[\leadsto \left(\color{blue}{\frac{\ell \cdot \pi}{\tan \left(\left(-\ell\right) \cdot \pi\right)} \cdot \left(F \cdot F\right)} + 1\right) \cdot \frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F} \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\ell \cdot \pi}{\tan \left(\left(-\ell\right) \cdot \pi\right)}, F \cdot F, 1\right)} \cdot \frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F} \]
      7. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\ell \cdot \pi}}{\tan \left(\left(-\ell\right) \cdot \pi\right)}, F \cdot F, 1\right) \cdot \frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F} \]
      8. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\pi \cdot \ell}}{\tan \left(\left(-\ell\right) \cdot \pi\right)}, F \cdot F, 1\right) \cdot \frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F} \]
      9. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\pi \cdot \ell}}{\tan \left(\left(-\ell\right) \cdot \pi\right)}, F \cdot F, 1\right) \cdot \frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F} \]
      10. lower-/.f6439.7

        \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{\pi \cdot \ell}{\tan \left(\left(-\ell\right) \cdot \pi\right)}}, F \cdot F, 1\right) \cdot \frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F} \]
      11. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\pi \cdot \ell}}{\tan \left(\left(-\ell\right) \cdot \pi\right)}, F \cdot F, 1\right) \cdot \frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F} \]
      12. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\ell \cdot \pi}}{\tan \left(\left(-\ell\right) \cdot \pi\right)}, F \cdot F, 1\right) \cdot \frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F} \]
      13. lift-*.f6439.7

        \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\ell \cdot \pi}}{\tan \left(\left(-\ell\right) \cdot \pi\right)}, F \cdot F, 1\right) \cdot \frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F} \]
    5. Applied rewrites39.7%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{\ell \cdot \pi}{\tan \left(\left(-\ell\right) \cdot \pi\right)}, F \cdot F, 1\right)} \cdot \frac{\tan \left(\left(-\ell\right) \cdot \pi\right)}{F \cdot F} \]
    6. Taylor expanded in F around 0

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

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

        \[\leadsto 1 \cdot \frac{\color{blue}{-1 \cdot \left(\ell \cdot \mathsf{PI}\left(\right)\right)}}{F \cdot F} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto 1 \cdot \frac{-1 \cdot \color{blue}{\left(\ell \cdot \mathsf{PI}\left(\right)\right)}}{F \cdot F} \]
        2. lower-*.f64N/A

          \[\leadsto 1 \cdot \frac{-1 \cdot \left(\ell \cdot \color{blue}{\mathsf{PI}\left(\right)}\right)}{F \cdot F} \]
        3. lower-PI.f6421.1

          \[\leadsto 1 \cdot \frac{-1 \cdot \left(\ell \cdot \pi\right)}{F \cdot F} \]
      4. Applied rewrites21.1%

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

      if -1.0000000000000001e-259 < (-.f64 (*.f64 (PI.f64) l) (*.f64 (/.f64 #s(literal 1 binary64) (*.f64 F F)) (tan.f64 (*.f64 (PI.f64) l))))

      1. Initial program 75.4%

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

        \[\leadsto \color{blue}{\ell \cdot \mathsf{PI}\left(\right)} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto \ell \cdot \color{blue}{\mathsf{PI}\left(\right)} \]
        2. lower-PI.f6473.9

          \[\leadsto \ell \cdot \pi \]
      4. Applied rewrites73.9%

        \[\leadsto \color{blue}{\ell \cdot \pi} \]
    8. Recombined 3 regimes into one program.
    9. Add Preprocessing

    Alternative 7: 73.9% accurate, 13.6× speedup?

    \[\begin{array}{l} l\_m = \left|\ell\right| \\ l\_s = \mathsf{copysign}\left(1, \ell\right) \\ l\_s \cdot \left(l\_m \cdot \pi\right) \end{array} \]
    l\_m = (fabs.f64 l)
    l\_s = (copysign.f64 #s(literal 1 binary64) l)
    (FPCore (l_s F l_m) :precision binary64 (* l_s (* l_m PI)))
    l\_m = fabs(l);
    l\_s = copysign(1.0, l);
    double code(double l_s, double F, double l_m) {
    	return l_s * (l_m * ((double) M_PI));
    }
    
    l\_m = Math.abs(l);
    l\_s = Math.copySign(1.0, l);
    public static double code(double l_s, double F, double l_m) {
    	return l_s * (l_m * Math.PI);
    }
    
    l\_m = math.fabs(l)
    l\_s = math.copysign(1.0, l)
    def code(l_s, F, l_m):
    	return l_s * (l_m * math.pi)
    
    l\_m = abs(l)
    l\_s = copysign(1.0, l)
    function code(l_s, F, l_m)
    	return Float64(l_s * Float64(l_m * pi))
    end
    
    l\_m = abs(l);
    l\_s = sign(l) * abs(1.0);
    function tmp = code(l_s, F, l_m)
    	tmp = l_s * (l_m * pi);
    end
    
    l\_m = N[Abs[l], $MachinePrecision]
    l\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[l]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
    code[l$95$s_, F_, l$95$m_] := N[(l$95$s * N[(l$95$m * Pi), $MachinePrecision]), $MachinePrecision]
    
    \begin{array}{l}
    l\_m = \left|\ell\right|
    \\
    l\_s = \mathsf{copysign}\left(1, \ell\right)
    
    \\
    l\_s \cdot \left(l\_m \cdot \pi\right)
    \end{array}
    
    Derivation
    1. Initial program 75.4%

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

      \[\leadsto \color{blue}{\ell \cdot \mathsf{PI}\left(\right)} \]
    3. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto \ell \cdot \color{blue}{\mathsf{PI}\left(\right)} \]
      2. lower-PI.f6473.9

        \[\leadsto \ell \cdot \pi \]
    4. Applied rewrites73.9%

      \[\leadsto \color{blue}{\ell \cdot \pi} \]
    5. Add Preprocessing

    Reproduce

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