?

Average Error: 16.5 → 1.5
Time: 16.4s
Precision: binary64
Cost: 463688

?

\[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
\[\begin{array}{l} t_0 := {\pi}^{3} \cdot 0.3333333333333333\\ t_1 := 0.008333333333333333 \cdot {\pi}^{5} - \left({\pi}^{5} \cdot 0.041666666666666664 + {\pi}^{2} \cdot \left(-0.16666666666666666 \cdot {\pi}^{3}\right)\right)\\ t_2 := F \cdot \left(\frac{t_1}{{\pi}^{2}} + \left(-0.1111111111111111 \cdot \frac{{\pi}^{6}}{{\pi}^{3}}\right)\right)\\ t_3 := \frac{F}{{\pi}^{2}}\\ \mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+16}:\\ \;\;\;\;\ell \cdot \pi\\ \mathbf{elif}\;\pi \cdot \ell \leq -4 \cdot 10^{-26}:\\ \;\;\;\;\pi \cdot \ell - \frac{2}{F} \cdot \left(\frac{0.5}{F} \cdot \tan \left(\pi \cdot \ell\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell - \frac{1}{F \cdot \left(\frac{\frac{F}{\ell}}{\pi} + -1 \cdot \left({\ell}^{3} \cdot t_2 + \left({\ell}^{5} \cdot \left(\left(-0.0001984126984126984 \cdot {\pi}^{7} - \left({\pi}^{4} \cdot \left({\pi}^{3} \cdot 0.013888888888888888\right) + \left({\pi}^{7} \cdot -0.001388888888888889 + t_1 \cdot \left(-0.5 \cdot {\pi}^{2}\right)\right)\right)\right) \cdot t_3 + \left(-t_0 \cdot \left(\frac{t_2}{\pi} + F \cdot \frac{t_1}{{\pi}^{3}}\right)\right)\right) + \ell \cdot \left(t_0 \cdot t_3\right)\right)\right)\right)}\\ \end{array} \]
(FPCore (F l)
 :precision binary64
 (- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))
(FPCore (F l)
 :precision binary64
 (let* ((t_0 (* (pow PI 3.0) 0.3333333333333333))
        (t_1
         (-
          (* 0.008333333333333333 (pow PI 5.0))
          (+
           (* (pow PI 5.0) 0.041666666666666664)
           (* (pow PI 2.0) (* -0.16666666666666666 (pow PI 3.0))))))
        (t_2
         (*
          F
          (+
           (/ t_1 (pow PI 2.0))
           (- (* 0.1111111111111111 (/ (pow PI 6.0) (pow PI 3.0)))))))
        (t_3 (/ F (pow PI 2.0))))
   (if (<= (* PI l) -2e+16)
     (* l PI)
     (if (<= (* PI l) -4e-26)
       (- (* PI l) (* (/ 2.0 F) (* (/ 0.5 F) (tan (* PI l)))))
       (-
        (* PI l)
        (/
         1.0
         (*
          F
          (+
           (/ (/ F l) PI)
           (*
            -1.0
            (+
             (* (pow l 3.0) t_2)
             (+
              (*
               (pow l 5.0)
               (+
                (*
                 (-
                  (* -0.0001984126984126984 (pow PI 7.0))
                  (+
                   (* (pow PI 4.0) (* (pow PI 3.0) 0.013888888888888888))
                   (+
                    (* (pow PI 7.0) -0.001388888888888889)
                    (* t_1 (* -0.5 (pow PI 2.0))))))
                 t_3)
                (- (* t_0 (+ (/ t_2 PI) (* F (/ t_1 (pow PI 3.0))))))))
              (* l (* t_0 t_3)))))))))))))
double code(double F, double l) {
	return (((double) M_PI) * l) - ((1.0 / (F * F)) * tan((((double) M_PI) * l)));
}
double code(double F, double l) {
	double t_0 = pow(((double) M_PI), 3.0) * 0.3333333333333333;
	double t_1 = (0.008333333333333333 * pow(((double) M_PI), 5.0)) - ((pow(((double) M_PI), 5.0) * 0.041666666666666664) + (pow(((double) M_PI), 2.0) * (-0.16666666666666666 * pow(((double) M_PI), 3.0))));
	double t_2 = F * ((t_1 / pow(((double) M_PI), 2.0)) + -(0.1111111111111111 * (pow(((double) M_PI), 6.0) / pow(((double) M_PI), 3.0))));
	double t_3 = F / pow(((double) M_PI), 2.0);
	double tmp;
	if ((((double) M_PI) * l) <= -2e+16) {
		tmp = l * ((double) M_PI);
	} else if ((((double) M_PI) * l) <= -4e-26) {
		tmp = (((double) M_PI) * l) - ((2.0 / F) * ((0.5 / F) * tan((((double) M_PI) * l))));
	} else {
		tmp = (((double) M_PI) * l) - (1.0 / (F * (((F / l) / ((double) M_PI)) + (-1.0 * ((pow(l, 3.0) * t_2) + ((pow(l, 5.0) * ((((-0.0001984126984126984 * pow(((double) M_PI), 7.0)) - ((pow(((double) M_PI), 4.0) * (pow(((double) M_PI), 3.0) * 0.013888888888888888)) + ((pow(((double) M_PI), 7.0) * -0.001388888888888889) + (t_1 * (-0.5 * pow(((double) M_PI), 2.0)))))) * t_3) + -(t_0 * ((t_2 / ((double) M_PI)) + (F * (t_1 / pow(((double) M_PI), 3.0))))))) + (l * (t_0 * t_3))))))));
	}
	return tmp;
}
public static double code(double F, double l) {
	return (Math.PI * l) - ((1.0 / (F * F)) * Math.tan((Math.PI * l)));
}
public static double code(double F, double l) {
	double t_0 = Math.pow(Math.PI, 3.0) * 0.3333333333333333;
	double t_1 = (0.008333333333333333 * Math.pow(Math.PI, 5.0)) - ((Math.pow(Math.PI, 5.0) * 0.041666666666666664) + (Math.pow(Math.PI, 2.0) * (-0.16666666666666666 * Math.pow(Math.PI, 3.0))));
	double t_2 = F * ((t_1 / Math.pow(Math.PI, 2.0)) + -(0.1111111111111111 * (Math.pow(Math.PI, 6.0) / Math.pow(Math.PI, 3.0))));
	double t_3 = F / Math.pow(Math.PI, 2.0);
	double tmp;
	if ((Math.PI * l) <= -2e+16) {
		tmp = l * Math.PI;
	} else if ((Math.PI * l) <= -4e-26) {
		tmp = (Math.PI * l) - ((2.0 / F) * ((0.5 / F) * Math.tan((Math.PI * l))));
	} else {
		tmp = (Math.PI * l) - (1.0 / (F * (((F / l) / Math.PI) + (-1.0 * ((Math.pow(l, 3.0) * t_2) + ((Math.pow(l, 5.0) * ((((-0.0001984126984126984 * Math.pow(Math.PI, 7.0)) - ((Math.pow(Math.PI, 4.0) * (Math.pow(Math.PI, 3.0) * 0.013888888888888888)) + ((Math.pow(Math.PI, 7.0) * -0.001388888888888889) + (t_1 * (-0.5 * Math.pow(Math.PI, 2.0)))))) * t_3) + -(t_0 * ((t_2 / Math.PI) + (F * (t_1 / Math.pow(Math.PI, 3.0))))))) + (l * (t_0 * t_3))))))));
	}
	return tmp;
}
def code(F, l):
	return (math.pi * l) - ((1.0 / (F * F)) * math.tan((math.pi * l)))
def code(F, l):
	t_0 = math.pow(math.pi, 3.0) * 0.3333333333333333
	t_1 = (0.008333333333333333 * math.pow(math.pi, 5.0)) - ((math.pow(math.pi, 5.0) * 0.041666666666666664) + (math.pow(math.pi, 2.0) * (-0.16666666666666666 * math.pow(math.pi, 3.0))))
	t_2 = F * ((t_1 / math.pow(math.pi, 2.0)) + -(0.1111111111111111 * (math.pow(math.pi, 6.0) / math.pow(math.pi, 3.0))))
	t_3 = F / math.pow(math.pi, 2.0)
	tmp = 0
	if (math.pi * l) <= -2e+16:
		tmp = l * math.pi
	elif (math.pi * l) <= -4e-26:
		tmp = (math.pi * l) - ((2.0 / F) * ((0.5 / F) * math.tan((math.pi * l))))
	else:
		tmp = (math.pi * l) - (1.0 / (F * (((F / l) / math.pi) + (-1.0 * ((math.pow(l, 3.0) * t_2) + ((math.pow(l, 5.0) * ((((-0.0001984126984126984 * math.pow(math.pi, 7.0)) - ((math.pow(math.pi, 4.0) * (math.pow(math.pi, 3.0) * 0.013888888888888888)) + ((math.pow(math.pi, 7.0) * -0.001388888888888889) + (t_1 * (-0.5 * math.pow(math.pi, 2.0)))))) * t_3) + -(t_0 * ((t_2 / math.pi) + (F * (t_1 / math.pow(math.pi, 3.0))))))) + (l * (t_0 * t_3))))))))
	return tmp
function code(F, l)
	return Float64(Float64(pi * l) - Float64(Float64(1.0 / Float64(F * F)) * tan(Float64(pi * l))))
end
function code(F, l)
	t_0 = Float64((pi ^ 3.0) * 0.3333333333333333)
	t_1 = Float64(Float64(0.008333333333333333 * (pi ^ 5.0)) - Float64(Float64((pi ^ 5.0) * 0.041666666666666664) + Float64((pi ^ 2.0) * Float64(-0.16666666666666666 * (pi ^ 3.0)))))
	t_2 = Float64(F * Float64(Float64(t_1 / (pi ^ 2.0)) + Float64(-Float64(0.1111111111111111 * Float64((pi ^ 6.0) / (pi ^ 3.0))))))
	t_3 = Float64(F / (pi ^ 2.0))
	tmp = 0.0
	if (Float64(pi * l) <= -2e+16)
		tmp = Float64(l * pi);
	elseif (Float64(pi * l) <= -4e-26)
		tmp = Float64(Float64(pi * l) - Float64(Float64(2.0 / F) * Float64(Float64(0.5 / F) * tan(Float64(pi * l)))));
	else
		tmp = Float64(Float64(pi * l) - Float64(1.0 / Float64(F * Float64(Float64(Float64(F / l) / pi) + Float64(-1.0 * Float64(Float64((l ^ 3.0) * t_2) + Float64(Float64((l ^ 5.0) * Float64(Float64(Float64(Float64(-0.0001984126984126984 * (pi ^ 7.0)) - Float64(Float64((pi ^ 4.0) * Float64((pi ^ 3.0) * 0.013888888888888888)) + Float64(Float64((pi ^ 7.0) * -0.001388888888888889) + Float64(t_1 * Float64(-0.5 * (pi ^ 2.0)))))) * t_3) + Float64(-Float64(t_0 * Float64(Float64(t_2 / pi) + Float64(F * Float64(t_1 / (pi ^ 3.0)))))))) + Float64(l * Float64(t_0 * t_3)))))))));
	end
	return tmp
end
function tmp = code(F, l)
	tmp = (pi * l) - ((1.0 / (F * F)) * tan((pi * l)));
end
function tmp_2 = code(F, l)
	t_0 = (pi ^ 3.0) * 0.3333333333333333;
	t_1 = (0.008333333333333333 * (pi ^ 5.0)) - (((pi ^ 5.0) * 0.041666666666666664) + ((pi ^ 2.0) * (-0.16666666666666666 * (pi ^ 3.0))));
	t_2 = F * ((t_1 / (pi ^ 2.0)) + -(0.1111111111111111 * ((pi ^ 6.0) / (pi ^ 3.0))));
	t_3 = F / (pi ^ 2.0);
	tmp = 0.0;
	if ((pi * l) <= -2e+16)
		tmp = l * pi;
	elseif ((pi * l) <= -4e-26)
		tmp = (pi * l) - ((2.0 / F) * ((0.5 / F) * tan((pi * l))));
	else
		tmp = (pi * l) - (1.0 / (F * (((F / l) / pi) + (-1.0 * (((l ^ 3.0) * t_2) + (((l ^ 5.0) * ((((-0.0001984126984126984 * (pi ^ 7.0)) - (((pi ^ 4.0) * ((pi ^ 3.0) * 0.013888888888888888)) + (((pi ^ 7.0) * -0.001388888888888889) + (t_1 * (-0.5 * (pi ^ 2.0)))))) * t_3) + -(t_0 * ((t_2 / pi) + (F * (t_1 / (pi ^ 3.0))))))) + (l * (t_0 * t_3))))))));
	end
	tmp_2 = tmp;
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]
code[F_, l_] := Block[{t$95$0 = N[(N[Power[Pi, 3.0], $MachinePrecision] * 0.3333333333333333), $MachinePrecision]}, Block[{t$95$1 = N[(N[(0.008333333333333333 * N[Power[Pi, 5.0], $MachinePrecision]), $MachinePrecision] - N[(N[(N[Power[Pi, 5.0], $MachinePrecision] * 0.041666666666666664), $MachinePrecision] + N[(N[Power[Pi, 2.0], $MachinePrecision] * N[(-0.16666666666666666 * N[Power[Pi, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(F * N[(N[(t$95$1 / N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision] + (-N[(0.1111111111111111 * N[(N[Power[Pi, 6.0], $MachinePrecision] / N[Power[Pi, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(F / N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(Pi * l), $MachinePrecision], -2e+16], N[(l * Pi), $MachinePrecision], If[LessEqual[N[(Pi * l), $MachinePrecision], -4e-26], N[(N[(Pi * l), $MachinePrecision] - N[(N[(2.0 / F), $MachinePrecision] * N[(N[(0.5 / F), $MachinePrecision] * N[Tan[N[(Pi * l), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(Pi * l), $MachinePrecision] - N[(1.0 / N[(F * N[(N[(N[(F / l), $MachinePrecision] / Pi), $MachinePrecision] + N[(-1.0 * N[(N[(N[Power[l, 3.0], $MachinePrecision] * t$95$2), $MachinePrecision] + N[(N[(N[Power[l, 5.0], $MachinePrecision] * N[(N[(N[(N[(-0.0001984126984126984 * N[Power[Pi, 7.0], $MachinePrecision]), $MachinePrecision] - N[(N[(N[Power[Pi, 4.0], $MachinePrecision] * N[(N[Power[Pi, 3.0], $MachinePrecision] * 0.013888888888888888), $MachinePrecision]), $MachinePrecision] + N[(N[(N[Power[Pi, 7.0], $MachinePrecision] * -0.001388888888888889), $MachinePrecision] + N[(t$95$1 * N[(-0.5 * N[Power[Pi, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * t$95$3), $MachinePrecision] + (-N[(t$95$0 * N[(N[(t$95$2 / Pi), $MachinePrecision] + N[(F * N[(t$95$1 / N[Power[Pi, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision]), $MachinePrecision] + N[(l * N[(t$95$0 * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)
\begin{array}{l}
t_0 := {\pi}^{3} \cdot 0.3333333333333333\\
t_1 := 0.008333333333333333 \cdot {\pi}^{5} - \left({\pi}^{5} \cdot 0.041666666666666664 + {\pi}^{2} \cdot \left(-0.16666666666666666 \cdot {\pi}^{3}\right)\right)\\
t_2 := F \cdot \left(\frac{t_1}{{\pi}^{2}} + \left(-0.1111111111111111 \cdot \frac{{\pi}^{6}}{{\pi}^{3}}\right)\right)\\
t_3 := \frac{F}{{\pi}^{2}}\\
\mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+16}:\\
\;\;\;\;\ell \cdot \pi\\

\mathbf{elif}\;\pi \cdot \ell \leq -4 \cdot 10^{-26}:\\
\;\;\;\;\pi \cdot \ell - \frac{2}{F} \cdot \left(\frac{0.5}{F} \cdot \tan \left(\pi \cdot \ell\right)\right)\\

\mathbf{else}:\\
\;\;\;\;\pi \cdot \ell - \frac{1}{F \cdot \left(\frac{\frac{F}{\ell}}{\pi} + -1 \cdot \left({\ell}^{3} \cdot t_2 + \left({\ell}^{5} \cdot \left(\left(-0.0001984126984126984 \cdot {\pi}^{7} - \left({\pi}^{4} \cdot \left({\pi}^{3} \cdot 0.013888888888888888\right) + \left({\pi}^{7} \cdot -0.001388888888888889 + t_1 \cdot \left(-0.5 \cdot {\pi}^{2}\right)\right)\right)\right) \cdot t_3 + \left(-t_0 \cdot \left(\frac{t_2}{\pi} + F \cdot \frac{t_1}{{\pi}^{3}}\right)\right)\right) + \ell \cdot \left(t_0 \cdot t_3\right)\right)\right)\right)}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 3 regimes
  2. if (*.f64 (PI.f64) l) < -2e16

    1. Initial program 22.7

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

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

      \[\leadsto \pi \cdot \ell - \color{blue}{\left(\ell \cdot \frac{\pi}{F \cdot F} + 0\right)} \]
    4. Simplified32.7

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

      [Start]32.7

      \[ \pi \cdot \ell - \left(\ell \cdot \frac{\pi}{F \cdot F} + 0\right) \]

      rational.json-simplify-4 [=>]32.7

      \[ \pi \cdot \ell - \color{blue}{\ell \cdot \frac{\pi}{F \cdot F}} \]
    5. Taylor expanded in F around inf 0.2

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

    if -2e16 < (*.f64 (PI.f64) l) < -4.0000000000000002e-26

    1. Initial program 4.2

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Applied egg-rr4.2

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

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

    if -4.0000000000000002e-26 < (*.f64 (PI.f64) l)

    1. Initial program 14.8

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Applied egg-rr8.8

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

      \[\leadsto \pi \cdot \ell - \frac{1}{F \cdot \color{blue}{\left(-1 \cdot \frac{F \cdot \left(\ell \cdot \left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right)\right)}{{\pi}^{2}} + \left(\frac{F}{\ell \cdot \pi} + \left(-1 \cdot \left(\left(\frac{\left(-0.0001984126984126984 \cdot {\pi}^{7} - \left(0.041666666666666664 \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot {\pi}^{4}\right) + \left(-0.001388888888888889 \cdot {\pi}^{7} + -0.5 \cdot \left(\left(0.008333333333333333 \cdot {\pi}^{5} - \left(0.041666666666666664 \cdot {\pi}^{5} + -0.5 \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot {\pi}^{2}\right)\right)\right) \cdot {\pi}^{2}\right)\right)\right)\right) \cdot F}{{\pi}^{2}} + \left(-1 \cdot \frac{\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot \left(-1 \cdot \frac{F \cdot {\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right)}^{2}}{{\pi}^{3}} + \frac{F \cdot \left(0.008333333333333333 \cdot {\pi}^{5} - \left(0.041666666666666664 \cdot {\pi}^{5} + -0.5 \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot {\pi}^{2}\right)\right)\right)}{{\pi}^{2}}\right)}{\pi} + -1 \cdot \frac{F \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot \left(0.008333333333333333 \cdot {\pi}^{5} - \left(0.041666666666666664 \cdot {\pi}^{5} + -0.5 \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot {\pi}^{2}\right)\right)\right)\right)}{{\pi}^{3}}\right)\right) \cdot {\ell}^{5}\right) + -1 \cdot \left({\ell}^{3} \cdot \left(-1 \cdot \frac{F \cdot {\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right)}^{2}}{{\pi}^{3}} + \frac{F \cdot \left(0.008333333333333333 \cdot {\pi}^{5} - \left(0.041666666666666664 \cdot {\pi}^{5} + -0.5 \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot {\pi}^{2}\right)\right)\right)}{{\pi}^{2}}\right)\right)\right)\right)\right)}} \]
    4. Simplified1.8

      \[\leadsto \pi \cdot \ell - \frac{1}{F \cdot \color{blue}{\left(\frac{\frac{F}{\ell}}{\pi} + -1 \cdot \left({\ell}^{3} \cdot \left(F \cdot \left(\frac{0.008333333333333333 \cdot {\pi}^{5} - \left({\pi}^{5} \cdot 0.041666666666666664 + {\pi}^{2} \cdot \left(-0.16666666666666666 \cdot {\pi}^{3}\right)\right)}{{\pi}^{2}} + \left(-0.1111111111111111 \cdot \frac{{\pi}^{6}}{{\pi}^{3}}\right)\right)\right) + \left({\ell}^{5} \cdot \left(\left(-0.0001984126984126984 \cdot {\pi}^{7} - \left({\pi}^{4} \cdot \left({\pi}^{3} \cdot 0.013888888888888888\right) + \left({\pi}^{7} \cdot -0.001388888888888889 + \left(0.008333333333333333 \cdot {\pi}^{5} - \left({\pi}^{5} \cdot 0.041666666666666664 + {\pi}^{2} \cdot \left(-0.16666666666666666 \cdot {\pi}^{3}\right)\right)\right) \cdot \left(-0.5 \cdot {\pi}^{2}\right)\right)\right)\right) \cdot \frac{F}{{\pi}^{2}} + \left(-\left({\pi}^{3} \cdot 0.3333333333333333\right) \cdot \left(\frac{F \cdot \left(\frac{0.008333333333333333 \cdot {\pi}^{5} - \left({\pi}^{5} \cdot 0.041666666666666664 + {\pi}^{2} \cdot \left(-0.16666666666666666 \cdot {\pi}^{3}\right)\right)}{{\pi}^{2}} + \left(-0.1111111111111111 \cdot \frac{{\pi}^{6}}{{\pi}^{3}}\right)\right)}{\pi} + F \cdot \frac{0.008333333333333333 \cdot {\pi}^{5} - \left({\pi}^{5} \cdot 0.041666666666666664 + {\pi}^{2} \cdot \left(-0.16666666666666666 \cdot {\pi}^{3}\right)\right)}{{\pi}^{3}}\right)\right)\right) + \ell \cdot \left(\left({\pi}^{3} \cdot 0.3333333333333333\right) \cdot \frac{F}{{\pi}^{2}}\right)\right)\right)\right)}} \]
      Proof

      [Start]2.0

      \[ \pi \cdot \ell - \frac{1}{F \cdot \left(-1 \cdot \frac{F \cdot \left(\ell \cdot \left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right)\right)}{{\pi}^{2}} + \left(\frac{F}{\ell \cdot \pi} + \left(-1 \cdot \left(\left(\frac{\left(-0.0001984126984126984 \cdot {\pi}^{7} - \left(0.041666666666666664 \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot {\pi}^{4}\right) + \left(-0.001388888888888889 \cdot {\pi}^{7} + -0.5 \cdot \left(\left(0.008333333333333333 \cdot {\pi}^{5} - \left(0.041666666666666664 \cdot {\pi}^{5} + -0.5 \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot {\pi}^{2}\right)\right)\right) \cdot {\pi}^{2}\right)\right)\right)\right) \cdot F}{{\pi}^{2}} + \left(-1 \cdot \frac{\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot \left(-1 \cdot \frac{F \cdot {\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right)}^{2}}{{\pi}^{3}} + \frac{F \cdot \left(0.008333333333333333 \cdot {\pi}^{5} - \left(0.041666666666666664 \cdot {\pi}^{5} + -0.5 \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot {\pi}^{2}\right)\right)\right)}{{\pi}^{2}}\right)}{\pi} + -1 \cdot \frac{F \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot \left(0.008333333333333333 \cdot {\pi}^{5} - \left(0.041666666666666664 \cdot {\pi}^{5} + -0.5 \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot {\pi}^{2}\right)\right)\right)\right)}{{\pi}^{3}}\right)\right) \cdot {\ell}^{5}\right) + -1 \cdot \left({\ell}^{3} \cdot \left(-1 \cdot \frac{F \cdot {\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right)}^{2}}{{\pi}^{3}} + \frac{F \cdot \left(0.008333333333333333 \cdot {\pi}^{5} - \left(0.041666666666666664 \cdot {\pi}^{5} + -0.5 \cdot \left(\left(-0.16666666666666666 \cdot {\pi}^{3} - -0.5 \cdot {\pi}^{3}\right) \cdot {\pi}^{2}\right)\right)\right)}{{\pi}^{2}}\right)\right)\right)\right)\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification1.5

    \[\leadsto \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+16}:\\ \;\;\;\;\ell \cdot \pi\\ \mathbf{elif}\;\pi \cdot \ell \leq -4 \cdot 10^{-26}:\\ \;\;\;\;\pi \cdot \ell - \frac{2}{F} \cdot \left(\frac{0.5}{F} \cdot \tan \left(\pi \cdot \ell\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell - \frac{1}{F \cdot \left(\frac{\frac{F}{\ell}}{\pi} + -1 \cdot \left({\ell}^{3} \cdot \left(F \cdot \left(\frac{0.008333333333333333 \cdot {\pi}^{5} - \left({\pi}^{5} \cdot 0.041666666666666664 + {\pi}^{2} \cdot \left(-0.16666666666666666 \cdot {\pi}^{3}\right)\right)}{{\pi}^{2}} + \left(-0.1111111111111111 \cdot \frac{{\pi}^{6}}{{\pi}^{3}}\right)\right)\right) + \left({\ell}^{5} \cdot \left(\left(-0.0001984126984126984 \cdot {\pi}^{7} - \left({\pi}^{4} \cdot \left({\pi}^{3} \cdot 0.013888888888888888\right) + \left({\pi}^{7} \cdot -0.001388888888888889 + \left(0.008333333333333333 \cdot {\pi}^{5} - \left({\pi}^{5} \cdot 0.041666666666666664 + {\pi}^{2} \cdot \left(-0.16666666666666666 \cdot {\pi}^{3}\right)\right)\right) \cdot \left(-0.5 \cdot {\pi}^{2}\right)\right)\right)\right) \cdot \frac{F}{{\pi}^{2}} + \left(-\left({\pi}^{3} \cdot 0.3333333333333333\right) \cdot \left(\frac{F \cdot \left(\frac{0.008333333333333333 \cdot {\pi}^{5} - \left({\pi}^{5} \cdot 0.041666666666666664 + {\pi}^{2} \cdot \left(-0.16666666666666666 \cdot {\pi}^{3}\right)\right)}{{\pi}^{2}} + \left(-0.1111111111111111 \cdot \frac{{\pi}^{6}}{{\pi}^{3}}\right)\right)}{\pi} + F \cdot \frac{0.008333333333333333 \cdot {\pi}^{5} - \left({\pi}^{5} \cdot 0.041666666666666664 + {\pi}^{2} \cdot \left(-0.16666666666666666 \cdot {\pi}^{3}\right)\right)}{{\pi}^{3}}\right)\right)\right) + \ell \cdot \left(\left({\pi}^{3} \cdot 0.3333333333333333\right) \cdot \frac{F}{{\pi}^{2}}\right)\right)\right)\right)}\\ \end{array} \]

Alternatives

Alternative 1
Error2.2
Cost150792
\[\begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+16}:\\ \;\;\;\;\ell \cdot \pi\\ \mathbf{elif}\;\pi \cdot \ell \leq -2 \cdot 10^{-100}:\\ \;\;\;\;\pi \cdot \ell - \frac{1}{F \cdot \frac{F}{\tan \left(\pi \cdot \ell\right)}}\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell - \frac{\frac{1}{F}}{\frac{\frac{F}{\ell}}{\pi} + \left(-\left(\ell \cdot \left(\left({\pi}^{3} \cdot 0.3333333333333333\right) \cdot \frac{F}{{\pi}^{2}}\right) + {\ell}^{3} \cdot \left(F \cdot \left(\frac{0.008333333333333333 \cdot {\pi}^{5} - \left({\pi}^{5} \cdot 0.041666666666666664 + {\pi}^{2} \cdot \left(-0.16666666666666666 \cdot {\pi}^{3}\right)\right)}{{\pi}^{2}} + \left(-0.1111111111111111 \cdot \frac{{\pi}^{6}}{{\pi}^{3}}\right)\right)\right)\right)\right)}\\ \end{array} \]
Alternative 2
Error1.1
Cost33096
\[\begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+16}:\\ \;\;\;\;\ell \cdot \pi\\ \mathbf{elif}\;\pi \cdot \ell \leq 5 \cdot 10^{-33}:\\ \;\;\;\;\pi \cdot \ell - \frac{1}{F \cdot \frac{F}{\tan \left(\pi \cdot \ell\right)}}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \pi\\ \end{array} \]
Alternative 3
Error1.1
Cost32968
\[\begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -2 \cdot 10^{+16}:\\ \;\;\;\;\ell \cdot \pi\\ \mathbf{elif}\;\pi \cdot \ell \leq 5 \cdot 10^{-33}:\\ \;\;\;\;\pi \cdot \ell - \frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \pi\\ \end{array} \]
Alternative 4
Error1.3
Cost26696
\[\begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -5:\\ \;\;\;\;\ell \cdot \pi\\ \mathbf{elif}\;\pi \cdot \ell \leq 5 \cdot 10^{-33}:\\ \;\;\;\;\pi \cdot \ell - \frac{1}{F \cdot \frac{\frac{F}{\ell}}{\pi}}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \pi\\ \end{array} \]
Alternative 5
Error1.1
Cost13640
\[\begin{array}{l} \mathbf{if}\;\ell \leq -0.5:\\ \;\;\;\;\ell \cdot \pi\\ \mathbf{elif}\;\ell \leq 1.95 \cdot 10^{-20}:\\ \;\;\;\;\pi \cdot \ell - \frac{\pi}{F} \cdot \frac{\ell}{F}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \pi\\ \end{array} \]
Alternative 6
Error1.1
Cost13640
\[\begin{array}{l} \mathbf{if}\;\ell \leq -0.5:\\ \;\;\;\;\ell \cdot \pi\\ \mathbf{elif}\;\ell \leq 1.95 \cdot 10^{-20}:\\ \;\;\;\;\pi \cdot \ell - \frac{\frac{\pi}{F}}{\frac{F}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \pi\\ \end{array} \]
Alternative 7
Error1.1
Cost7304
\[\begin{array}{l} \mathbf{if}\;\ell \leq -0.5:\\ \;\;\;\;\ell \cdot \pi\\ \mathbf{elif}\;\ell \leq 1.95 \cdot 10^{-20}:\\ \;\;\;\;\pi \cdot \left(\ell - \frac{\ell}{F} \cdot \frac{1}{F}\right)\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \pi\\ \end{array} \]
Alternative 8
Error5.1
Cost7176
\[\begin{array}{l} \mathbf{if}\;\ell \leq -0.5:\\ \;\;\;\;\ell \cdot \pi\\ \mathbf{elif}\;\ell \leq 1.95 \cdot 10^{-20}:\\ \;\;\;\;\pi \cdot \left(\ell - \frac{\ell}{F \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \pi\\ \end{array} \]
Alternative 9
Error1.1
Cost7176
\[\begin{array}{l} \mathbf{if}\;\ell \leq -0.5:\\ \;\;\;\;\ell \cdot \pi\\ \mathbf{elif}\;\ell \leq 1.95 \cdot 10^{-20}:\\ \;\;\;\;\left(\ell - \frac{\frac{\ell}{F}}{F}\right) \cdot \pi\\ \mathbf{else}:\\ \;\;\;\;\ell \cdot \pi\\ \end{array} \]
Alternative 10
Error13.2
Cost6528
\[\ell \cdot \pi \]

Error

Reproduce?

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