Average Error: 17.1 → 12.5
Time: 8.1s
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}}\\ t_1 := t_0 \cdot \left(t_0 \cdot \left(\ell \cdot \sqrt{\pi}\right)\right)\\ \pi \cdot \ell - \frac{1}{F} \cdot \frac{\frac{\sin t_1}{\cos t_1}}{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}}\\
t_1 := t_0 \cdot \left(t_0 \cdot \left(\ell \cdot \sqrt{\pi}\right)\right)\\
\pi \cdot \ell - \frac{1}{F} \cdot \frac{\frac{\sin t_1}{\cos t_1}}{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))) (t_1 (* t_0 (* t_0 (* l (sqrt PI))))))
   (- (* PI l) (* (/ 1.0 F) (/ (/ (sin t_1) (cos t_1)) 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));
	double t_1 = t_0 * (t_0 * (l * sqrt((double) M_PI)));
	return (((double) M_PI) * l) - ((1.0 / F) * ((sin(t_1) / cos(t_1)) / 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 17.1

    \[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right) \]
  2. Using strategy rm
  3. Applied *-un-lft-identity_binary6417.1

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

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

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

    \[\leadsto \pi \cdot \ell - \frac{1}{F} \cdot \color{blue}{\frac{\tan \left(\pi \cdot \ell\right)}{F}} \]
  7. Using strategy rm
  8. Applied add-sqr-sqrt_binary6412.6

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

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

    \[\leadsto \pi \cdot \ell - \frac{1}{F} \cdot \frac{\tan \left(\sqrt{\pi} \cdot \color{blue}{\left(\ell \cdot \sqrt{\pi}\right)}\right)}{F} \]
  11. Using strategy rm
  12. Applied add-sqr-sqrt_binary6412.5

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

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

    \[\leadsto \pi \cdot \ell - \frac{1}{F} \cdot \frac{\tan \left(\sqrt{\sqrt{\pi}} \cdot \color{blue}{\left(\left(\ell \cdot \sqrt{\pi}\right) \cdot \sqrt{\sqrt{\pi}}\right)}\right)}{F} \]
  15. Using strategy rm
  16. Applied tan-quot_binary6412.5

    \[\leadsto \pi \cdot \ell - \frac{1}{F} \cdot \frac{\color{blue}{\frac{\sin \left(\sqrt{\sqrt{\pi}} \cdot \left(\left(\ell \cdot \sqrt{\pi}\right) \cdot \sqrt{\sqrt{\pi}}\right)\right)}{\cos \left(\sqrt{\sqrt{\pi}} \cdot \left(\left(\ell \cdot \sqrt{\pi}\right) \cdot \sqrt{\sqrt{\pi}}\right)\right)}}}{F} \]
  17. Final simplification12.5

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

Reproduce

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