Average Error: 8.4 → 1.0
Time: 44.2s
Precision: 64
\[\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)\]
\[\pi \cdot \ell - \left(\sqrt[3]{\frac{\tan \left(\pi \cdot \ell\right)}{F} \cdot \frac{1}{F}} \cdot \sqrt[3]{\frac{\tan \left(\pi \cdot \ell\right)}{F} \cdot \frac{1}{F}}\right) \cdot \left(\sqrt[3]{\frac{1}{F}} \cdot \sqrt[3]{\frac{\tan \left(\pi \cdot \ell\right)}{F}}\right)\]
\pi \cdot \ell - \frac{1}{F \cdot F} \cdot \tan \left(\pi \cdot \ell\right)
\pi \cdot \ell - \left(\sqrt[3]{\frac{\tan \left(\pi \cdot \ell\right)}{F} \cdot \frac{1}{F}} \cdot \sqrt[3]{\frac{\tan \left(\pi \cdot \ell\right)}{F} \cdot \frac{1}{F}}\right) \cdot \left(\sqrt[3]{\frac{1}{F}} \cdot \sqrt[3]{\frac{\tan \left(\pi \cdot \ell\right)}{F}}\right)
double f(double F, double l) {
        double r1044545 = atan2(1.0, 0.0);
        double r1044546 = l;
        double r1044547 = r1044545 * r1044546;
        double r1044548 = 1.0;
        double r1044549 = F;
        double r1044550 = r1044549 * r1044549;
        double r1044551 = r1044548 / r1044550;
        double r1044552 = tan(r1044547);
        double r1044553 = r1044551 * r1044552;
        double r1044554 = r1044547 - r1044553;
        return r1044554;
}

double f(double F, double l) {
        double r1044555 = atan2(1.0, 0.0);
        double r1044556 = l;
        double r1044557 = r1044555 * r1044556;
        double r1044558 = tan(r1044557);
        double r1044559 = F;
        double r1044560 = r1044558 / r1044559;
        double r1044561 = 1.0;
        double r1044562 = r1044561 / r1044559;
        double r1044563 = r1044560 * r1044562;
        double r1044564 = cbrt(r1044563);
        double r1044565 = r1044564 * r1044564;
        double r1044566 = cbrt(r1044562);
        double r1044567 = cbrt(r1044560);
        double r1044568 = r1044566 * r1044567;
        double r1044569 = r1044565 * r1044568;
        double r1044570 = r1044557 - r1044569;
        return r1044570;
}

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 8.4

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

    \[\leadsto \color{blue}{\pi \cdot \ell - \frac{\tan \left(\pi \cdot \ell\right)}{F \cdot F}}\]
  3. Using strategy rm
  4. Applied *-un-lft-identity8.0

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

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

    \[\leadsto \pi \cdot \ell - \color{blue}{\left(\sqrt[3]{\frac{1}{F} \cdot \frac{\tan \left(\pi \cdot \ell\right)}{F}} \cdot \sqrt[3]{\frac{1}{F} \cdot \frac{\tan \left(\pi \cdot \ell\right)}{F}}\right) \cdot \sqrt[3]{\frac{1}{F} \cdot \frac{\tan \left(\pi \cdot \ell\right)}{F}}}\]
  8. Using strategy rm
  9. Applied cbrt-prod1.0

    \[\leadsto \pi \cdot \ell - \left(\sqrt[3]{\frac{1}{F} \cdot \frac{\tan \left(\pi \cdot \ell\right)}{F}} \cdot \sqrt[3]{\frac{1}{F} \cdot \frac{\tan \left(\pi \cdot \ell\right)}{F}}\right) \cdot \color{blue}{\left(\sqrt[3]{\frac{1}{F}} \cdot \sqrt[3]{\frac{\tan \left(\pi \cdot \ell\right)}{F}}\right)}\]
  10. Final simplification1.0

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

Reproduce

herbie shell --seed 2019121 +o rules:numerics
(FPCore (F l)
  :name "VandenBroeck and Keller, Equation (6)"
  (- (* PI l) (* (/ 1 (* F F)) (tan (* PI l)))))