Average Error: 16.6 → 12.5
Time: 7.9s
Precision: binary64
\[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
\[\begin{array}{l} t_0 := \sqrt{\sqrt{\pi}}\\ \pi \cdot \ell - \frac{\frac{\tan \left(\sqrt{\pi} \cdot \left(t_0 \cdot \left(\ell \cdot t_0\right)\right)\right)}{F}}{F} \end{array} \]
\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)
\begin{array}{l}
t_0 := \sqrt{\sqrt{\pi}}\\
\pi \cdot \ell - \frac{\frac{\tan \left(\sqrt{\pi} \cdot \left(t_0 \cdot \left(\ell \cdot t_0\right)\right)\right)}{F}}{F}
\end{array}
(FPCore (F l)
 :precision binary64
 (- (* PI l) (* (/ 1.0 (* F F)) (tan (* PI l)))))
(FPCore (F l)
 :precision binary64
 (let* ((t_0 (sqrt (sqrt PI))))
   (- (* PI l) (/ (/ (tan (* (sqrt PI) (* t_0 (* l t_0)))) F) F))))
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 = sqrt(sqrt((double) M_PI));
	return (((double) M_PI) * l) - ((tan(sqrt((double) M_PI) * (t_0 * (l * t_0))) / F) / F);
}

Error

Bits error versus F

Bits error versus l

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 16.6

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

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

    \[\leadsto \pi \cdot \ell - \color{blue}{\frac{\frac{\tan \left(\pi \cdot \ell\right)}{F}}{F}} \]
  4. Applied add-sqr-sqrt_binary6412.6

    \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \left(\color{blue}{\left(\sqrt{\pi} \cdot \sqrt{\pi}\right)} \cdot \ell\right)}{F}}{F} \]
  5. Applied associate-*l*_binary6412.6

    \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \color{blue}{\left(\sqrt{\pi} \cdot \left(\sqrt{\pi} \cdot \ell\right)\right)}}{F}}{F} \]
  6. Applied add-sqr-sqrt_binary6412.5

    \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \left(\sqrt{\pi} \cdot \left(\color{blue}{\left(\sqrt{\sqrt{\pi}} \cdot \sqrt{\sqrt{\pi}}\right)} \cdot \ell\right)\right)}{F}}{F} \]
  7. Applied associate-*l*_binary6412.5

    \[\leadsto \pi \cdot \ell - \frac{\frac{\tan \left(\sqrt{\pi} \cdot \color{blue}{\left(\sqrt{\sqrt{\pi}} \cdot \left(\sqrt{\sqrt{\pi}} \cdot \ell\right)\right)}\right)}{F}}{F} \]
  8. Final simplification12.5

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

Reproduce

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