?

Average Accuracy: 74.3% → 98.5%
Time: 15.8s
Precision: binary64
Cost: 33096

?

\[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
\[\begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -1 \cdot 10^{+33}:\\ \;\;\;\;\frac{\pi \cdot \ell + 2}{\frac{\mathsf{fma}\left(\ell, \pi, 2\right)}{\ell} \cdot \frac{1}{\pi}}\\ \mathbf{elif}\;\pi \cdot \ell \leq 2 \cdot 10^{+14}:\\ \;\;\;\;\pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F} \cdot \frac{1}{F}\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot \ell + 1\right) + -1\\ \end{array} \]
(FPCore (F l)
 :precision binary64
 (- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))
(FPCore (F l)
 :precision binary64
 (if (<= (* PI l) -1e+33)
   (/ (+ (* PI l) 2.0) (* (/ (fma l PI 2.0) l) (/ 1.0 PI)))
   (if (<= (* PI l) 2e+14)
     (- (* PI l) (* (/ (tan (* PI l)) F) (/ 1.0 F)))
     (+ (+ (* PI l) 1.0) -1.0))))
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 tmp;
	if ((((double) M_PI) * l) <= -1e+33) {
		tmp = ((((double) M_PI) * l) + 2.0) / ((fma(l, ((double) M_PI), 2.0) / l) * (1.0 / ((double) M_PI)));
	} else if ((((double) M_PI) * l) <= 2e+14) {
		tmp = (((double) M_PI) * l) - ((tan((((double) M_PI) * l)) / F) * (1.0 / F));
	} else {
		tmp = ((((double) M_PI) * l) + 1.0) + -1.0;
	}
	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)
	tmp = 0.0
	if (Float64(pi * l) <= -1e+33)
		tmp = Float64(Float64(Float64(pi * l) + 2.0) / Float64(Float64(fma(l, pi, 2.0) / l) * Float64(1.0 / pi)));
	elseif (Float64(pi * l) <= 2e+14)
		tmp = Float64(Float64(pi * l) - Float64(Float64(tan(Float64(pi * l)) / F) * Float64(1.0 / F)));
	else
		tmp = Float64(Float64(Float64(pi * l) + 1.0) + -1.0);
	end
	return 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_] := If[LessEqual[N[(Pi * l), $MachinePrecision], -1e+33], N[(N[(N[(Pi * l), $MachinePrecision] + 2.0), $MachinePrecision] / N[(N[(N[(l * Pi + 2.0), $MachinePrecision] / l), $MachinePrecision] * N[(1.0 / Pi), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(Pi * l), $MachinePrecision], 2e+14], N[(N[(Pi * l), $MachinePrecision] - N[(N[(N[Tan[N[(Pi * l), $MachinePrecision]], $MachinePrecision] / F), $MachinePrecision] * N[(1.0 / F), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(Pi * l), $MachinePrecision] + 1.0), $MachinePrecision] + -1.0), $MachinePrecision]]]
\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)
\begin{array}{l}
\mathbf{if}\;\pi \cdot \ell \leq -1 \cdot 10^{+33}:\\
\;\;\;\;\frac{\pi \cdot \ell + 2}{\frac{\mathsf{fma}\left(\ell, \pi, 2\right)}{\ell} \cdot \frac{1}{\pi}}\\

\mathbf{elif}\;\pi \cdot \ell \leq 2 \cdot 10^{+14}:\\
\;\;\;\;\pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F} \cdot \frac{1}{F}\\

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


\end{array}

Error?

Derivation?

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

    1. Initial program 63.9%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Simplified63.9%

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

      [Start]63.9

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

      associate-*l/ [=>]63.9

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

      *-lft-identity [=>]63.9

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

      \[\leadsto \color{blue}{\ell \cdot \pi} \]
    4. Applied egg-rr99.6%

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

      [Start]99.6

      \[ \ell \cdot \pi \]

      expm1-log1p-u [=>]0.0

      \[ \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\ell \cdot \pi\right)\right)} \]

      expm1-udef [=>]0.0

      \[ \color{blue}{e^{\mathsf{log1p}\left(\ell \cdot \pi\right)} - 1} \]

      log1p-udef [=>]0.0

      \[ e^{\color{blue}{\log \left(1 + \ell \cdot \pi\right)}} - 1 \]

      add-exp-log [<=]99.6

      \[ \color{blue}{\left(1 + \ell \cdot \pi\right)} - 1 \]
    5. Simplified99.6%

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

      [Start]99.6

      \[ \left(1 + \ell \cdot \pi\right) - 1 \]

      associate--l+ [=>]99.6

      \[ \color{blue}{1 + \left(\ell \cdot \pi - 1\right)} \]
    6. Applied egg-rr44.3%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(\ell, \pi, 1\right) \cdot \mathsf{fma}\left(\ell, \pi, 1\right) - 1}{\mathsf{fma}\left(\ell, \pi, 1\right) + 1}} \]
      Proof

      [Start]99.6

      \[ 1 + \left(\ell \cdot \pi - 1\right) \]

      associate-+r- [=>]99.6

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

      flip-- [=>]44.3

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

      +-commutative [=>]44.3

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

      +-commutative [=>]44.3

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

      fma-def [=>]44.3

      \[ \frac{\color{blue}{\mathsf{fma}\left(\ell, \pi, 1\right)} \cdot \left(\ell \cdot \pi + 1\right) - 1 \cdot 1}{\left(1 + \ell \cdot \pi\right) + 1} \]

      fma-def [=>]44.3

      \[ \frac{\mathsf{fma}\left(\ell, \pi, 1\right) \cdot \color{blue}{\mathsf{fma}\left(\ell, \pi, 1\right)} - 1 \cdot 1}{\left(1 + \ell \cdot \pi\right) + 1} \]

      metadata-eval [=>]44.3

      \[ \frac{\mathsf{fma}\left(\ell, \pi, 1\right) \cdot \mathsf{fma}\left(\ell, \pi, 1\right) - \color{blue}{1}}{\left(1 + \ell \cdot \pi\right) + 1} \]

      +-commutative [=>]44.3

      \[ \frac{\mathsf{fma}\left(\ell, \pi, 1\right) \cdot \mathsf{fma}\left(\ell, \pi, 1\right) - 1}{\color{blue}{\left(\ell \cdot \pi + 1\right)} + 1} \]

      fma-def [=>]44.3

      \[ \frac{\mathsf{fma}\left(\ell, \pi, 1\right) \cdot \mathsf{fma}\left(\ell, \pi, 1\right) - 1}{\color{blue}{\mathsf{fma}\left(\ell, \pi, 1\right)} + 1} \]
    7. Simplified99.6%

      \[\leadsto \color{blue}{\frac{\ell \cdot \pi + 2}{\frac{\ell \cdot \pi + 2}{\ell \cdot \pi}}} \]
      Proof

      [Start]44.3

      \[ \frac{\mathsf{fma}\left(\ell, \pi, 1\right) \cdot \mathsf{fma}\left(\ell, \pi, 1\right) - 1}{\mathsf{fma}\left(\ell, \pi, 1\right) + 1} \]

      difference-of-sqr-1 [=>]44.3

      \[ \frac{\color{blue}{\left(\mathsf{fma}\left(\ell, \pi, 1\right) + 1\right) \cdot \left(\mathsf{fma}\left(\ell, \pi, 1\right) - 1\right)}}{\mathsf{fma}\left(\ell, \pi, 1\right) + 1} \]

      fma-udef [=>]44.3

      \[ \frac{\left(\mathsf{fma}\left(\ell, \pi, 1\right) + 1\right) \cdot \left(\color{blue}{\left(\ell \cdot \pi + 1\right)} - 1\right)}{\mathsf{fma}\left(\ell, \pi, 1\right) + 1} \]

      associate--l+ [=>]44.3

      \[ \frac{\left(\mathsf{fma}\left(\ell, \pi, 1\right) + 1\right) \cdot \color{blue}{\left(\ell \cdot \pi + \left(1 - 1\right)\right)}}{\mathsf{fma}\left(\ell, \pi, 1\right) + 1} \]

      metadata-eval [=>]44.3

      \[ \frac{\left(\mathsf{fma}\left(\ell, \pi, 1\right) + 1\right) \cdot \left(\ell \cdot \pi + \color{blue}{0}\right)}{\mathsf{fma}\left(\ell, \pi, 1\right) + 1} \]

      +-rgt-identity [=>]44.3

      \[ \frac{\left(\mathsf{fma}\left(\ell, \pi, 1\right) + 1\right) \cdot \color{blue}{\left(\ell \cdot \pi\right)}}{\mathsf{fma}\left(\ell, \pi, 1\right) + 1} \]

      associate-/l* [=>]99.6

      \[ \color{blue}{\frac{\mathsf{fma}\left(\ell, \pi, 1\right) + 1}{\frac{\mathsf{fma}\left(\ell, \pi, 1\right) + 1}{\ell \cdot \pi}}} \]

      fma-udef [=>]99.6

      \[ \frac{\color{blue}{\left(\ell \cdot \pi + 1\right)} + 1}{\frac{\mathsf{fma}\left(\ell, \pi, 1\right) + 1}{\ell \cdot \pi}} \]

      associate-+l+ [=>]99.6

      \[ \frac{\color{blue}{\ell \cdot \pi + \left(1 + 1\right)}}{\frac{\mathsf{fma}\left(\ell, \pi, 1\right) + 1}{\ell \cdot \pi}} \]

      metadata-eval [=>]99.6

      \[ \frac{\ell \cdot \pi + \color{blue}{2}}{\frac{\mathsf{fma}\left(\ell, \pi, 1\right) + 1}{\ell \cdot \pi}} \]

      fma-udef [=>]99.6

      \[ \frac{\ell \cdot \pi + 2}{\frac{\color{blue}{\left(\ell \cdot \pi + 1\right)} + 1}{\ell \cdot \pi}} \]

      associate-+l+ [=>]99.6

      \[ \frac{\ell \cdot \pi + 2}{\frac{\color{blue}{\ell \cdot \pi + \left(1 + 1\right)}}{\ell \cdot \pi}} \]

      metadata-eval [=>]99.6

      \[ \frac{\ell \cdot \pi + 2}{\frac{\ell \cdot \pi + \color{blue}{2}}{\ell \cdot \pi}} \]
    8. Applied egg-rr99.6%

      \[\leadsto \frac{\ell \cdot \pi + 2}{\color{blue}{\frac{\mathsf{fma}\left(\ell, \pi, 2\right)}{\ell} \cdot \frac{1}{\pi}}} \]
      Proof

      [Start]99.6

      \[ \frac{\ell \cdot \pi + 2}{\frac{\ell \cdot \pi + 2}{\ell \cdot \pi}} \]

      associate-/r* [=>]99.6

      \[ \frac{\ell \cdot \pi + 2}{\color{blue}{\frac{\frac{\ell \cdot \pi + 2}{\ell}}{\pi}}} \]

      div-inv [=>]99.6

      \[ \frac{\ell \cdot \pi + 2}{\color{blue}{\frac{\ell \cdot \pi + 2}{\ell} \cdot \frac{1}{\pi}}} \]

      fma-def [=>]99.6

      \[ \frac{\ell \cdot \pi + 2}{\frac{\color{blue}{\mathsf{fma}\left(\ell, \pi, 2\right)}}{\ell} \cdot \frac{1}{\pi}} \]

    if -9.9999999999999995e32 < (*.f64 (PI.f64) l) < 2e14

    1. Initial program 84.7%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Simplified85.4%

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

      [Start]84.7

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

      associate-*l/ [=>]85.4

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

      *-lft-identity [=>]85.4

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

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

      [Start]85.4

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

      associate-/r* [=>]97.6

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

      div-inv [=>]97.6

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

    if 2e14 < (*.f64 (PI.f64) l)

    1. Initial program 63.4%

      \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
    2. Simplified63.4%

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

      [Start]63.4

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

      associate-*l/ [=>]63.4

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

      *-lft-identity [=>]63.4

      \[ \pi \cdot \ell - \frac{\color{blue}{\tan \left(\pi \cdot \ell\right)}}{F \cdot F} \]
    3. Taylor expanded in l around inf 99.4%

      \[\leadsto \color{blue}{\ell \cdot \pi} \]
    4. Applied egg-rr99.4%

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

      [Start]99.4

      \[ \ell \cdot \pi \]

      expm1-log1p-u [=>]90.6

      \[ \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\ell \cdot \pi\right)\right)} \]

      expm1-udef [=>]90.6

      \[ \color{blue}{e^{\mathsf{log1p}\left(\ell \cdot \pi\right)} - 1} \]

      log1p-udef [=>]90.6

      \[ e^{\color{blue}{\log \left(1 + \ell \cdot \pi\right)}} - 1 \]

      add-exp-log [<=]99.4

      \[ \color{blue}{\left(1 + \ell \cdot \pi\right)} - 1 \]
  3. Recombined 3 regimes into one program.
  4. Final simplification98.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -1 \cdot 10^{+33}:\\ \;\;\;\;\frac{\pi \cdot \ell + 2}{\frac{\mathsf{fma}\left(\ell, \pi, 2\right)}{\ell} \cdot \frac{1}{\pi}}\\ \mathbf{elif}\;\pi \cdot \ell \leq 2 \cdot 10^{+14}:\\ \;\;\;\;\pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F} \cdot \frac{1}{F}\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot \ell + 1\right) + -1\\ \end{array} \]

Alternatives

Alternative 1
Accuracy98.5%
Cost33096
\[\begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -1 \cdot 10^{+33}:\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{elif}\;\pi \cdot \ell \leq 2 \cdot 10^{+14}:\\ \;\;\;\;\pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F} \cdot \frac{1}{F}\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot \ell + 1\right) + -1\\ \end{array} \]
Alternative 2
Accuracy98.6%
Cost32968
\[\begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -1 \cdot 10^{+33}:\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{elif}\;\pi \cdot \ell \leq 2 \cdot 10^{+14}:\\ \;\;\;\;\pi \cdot \ell - \frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot \ell + 1\right) + -1\\ \end{array} \]
Alternative 3
Accuracy96.5%
Cost26696
\[\begin{array}{l} \mathbf{if}\;\pi \cdot \ell \leq -1 \cdot 10^{+33}:\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{elif}\;\pi \cdot \ell \leq 2 \cdot 10^{-31}:\\ \;\;\;\;\pi \cdot \ell + \frac{\pi \cdot \ell}{F} \cdot \frac{-1}{F}\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot \ell + 1\right) + -1\\ \end{array} \]
Alternative 4
Accuracy98.1%
Cost13768
\[\begin{array}{l} \mathbf{if}\;\ell \leq -8.2 \cdot 10^{+29}:\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{elif}\;\ell \leq 0.45:\\ \;\;\;\;\pi \cdot \ell + \frac{\ell}{\frac{F}{\pi}} \cdot \frac{-1}{F}\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot \ell + 1\right) + -1\\ \end{array} \]
Alternative 5
Accuracy91.9%
Cost13640
\[\begin{array}{l} \mathbf{if}\;\ell \leq -8.2 \cdot 10^{+29}:\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{elif}\;\ell \leq 0.45:\\ \;\;\;\;\pi \cdot \ell - \pi \cdot \frac{\ell}{F \cdot F}\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot \ell + 1\right) + -1\\ \end{array} \]
Alternative 6
Accuracy91.9%
Cost13640
\[\begin{array}{l} \mathbf{if}\;\ell \leq -8.2 \cdot 10^{+29}:\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{elif}\;\ell \leq 0.45:\\ \;\;\;\;\pi \cdot \ell - \frac{\pi}{\frac{F \cdot F}{\ell}}\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot \ell + 1\right) + -1\\ \end{array} \]
Alternative 7
Accuracy91.5%
Cost13512
\[\begin{array}{l} \mathbf{if}\;\ell \leq -8.2 \cdot 10^{+29}:\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{elif}\;\ell \leq 0.45:\\ \;\;\;\;\ell \cdot \left(\pi \cdot \left(1 - {F}^{-2}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot \ell + 1\right) + -1\\ \end{array} \]
Alternative 8
Accuracy79.2%
Cost7952
\[\begin{array}{l} t_0 := \pi \cdot \ell + 2\\ \mathbf{if}\;F \cdot F \leq 10^{-317}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \cdot F \leq 10^{-291}:\\ \;\;\;\;\frac{\pi}{-F} \cdot \frac{\ell}{F}\\ \mathbf{elif}\;F \cdot F \leq 4 \cdot 10^{-135}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \cdot F \leq 2.5 \cdot 10^{-23}:\\ \;\;\;\;\ell \cdot \left(\pi \cdot \frac{-1}{F \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell\\ \end{array} \]
Alternative 9
Accuracy79.2%
Cost7888
\[\begin{array}{l} t_0 := \pi \cdot \ell + 2\\ t_1 := \frac{-\ell}{\frac{F \cdot F}{\pi}}\\ \mathbf{if}\;F \cdot F \leq 10^{-317}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \cdot F \leq 1.95 \cdot 10^{-291}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;F \cdot F \leq 5.8 \cdot 10^{-133}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \cdot F \leq 2.4 \cdot 10^{-23}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell\\ \end{array} \]
Alternative 10
Accuracy79.2%
Cost7888
\[\begin{array}{l} t_0 := \pi \cdot \ell + 2\\ \mathbf{if}\;F \cdot F \leq 10^{-317}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \cdot F \leq 4.1 \cdot 10^{-289}:\\ \;\;\;\;\frac{-\ell}{\frac{F \cdot F}{\pi}}\\ \mathbf{elif}\;F \cdot F \leq 7 \cdot 10^{-134}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \cdot F \leq 2.4 \cdot 10^{-23}:\\ \;\;\;\;\ell \cdot \left(-\frac{\pi}{F \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell\\ \end{array} \]
Alternative 11
Accuracy79.2%
Cost7888
\[\begin{array}{l} t_0 := \pi \cdot \ell + 2\\ \mathbf{if}\;F \cdot F \leq 10^{-317}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \cdot F \leq 10^{-291}:\\ \;\;\;\;\frac{\pi}{-F} \cdot \frac{\ell}{F}\\ \mathbf{elif}\;F \cdot F \leq 4 \cdot 10^{-135}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;F \cdot F \leq 2.5 \cdot 10^{-23}:\\ \;\;\;\;\ell \cdot \left(-\frac{\pi}{F \cdot F}\right)\\ \mathbf{else}:\\ \;\;\;\;\pi \cdot \ell\\ \end{array} \]
Alternative 12
Accuracy91.5%
Cost7304
\[\begin{array}{l} \mathbf{if}\;\ell \leq -8.2 \cdot 10^{+29}:\\ \;\;\;\;\pi \cdot \ell\\ \mathbf{elif}\;\ell \leq 0.45:\\ \;\;\;\;\ell \cdot \left(\pi \cdot \left(1 + \frac{-1}{F \cdot F}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\left(\pi \cdot \ell + 1\right) + -1\\ \end{array} \]
Alternative 13
Accuracy79.3%
Cost6528
\[\pi \cdot \ell \]
Alternative 14
Accuracy3.3%
Cost64
\[0 \]

Error

Reproduce?

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