Average Error: 13.7 → 13.6
Time: 37.5s
Precision: 64
\[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\]
\[\mathsf{fma}\left({\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\sqrt[3]{1} \cdot \sqrt[3]{1}\right)}\right)}^{\left(\frac{\sqrt[3]{1}}{2}\right)}, F \cdot \frac{1}{\sin B}, -\frac{x \cdot 1}{\tan B}\right)\]
\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}
\mathsf{fma}\left({\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\sqrt[3]{1} \cdot \sqrt[3]{1}\right)}\right)}^{\left(\frac{\sqrt[3]{1}}{2}\right)}, F \cdot \frac{1}{\sin B}, -\frac{x \cdot 1}{\tan B}\right)
double f(double F, double B, double x) {
        double r62284 = x;
        double r62285 = 1.0;
        double r62286 = B;
        double r62287 = tan(r62286);
        double r62288 = r62285 / r62287;
        double r62289 = r62284 * r62288;
        double r62290 = -r62289;
        double r62291 = F;
        double r62292 = sin(r62286);
        double r62293 = r62291 / r62292;
        double r62294 = r62291 * r62291;
        double r62295 = 2.0;
        double r62296 = r62294 + r62295;
        double r62297 = r62295 * r62284;
        double r62298 = r62296 + r62297;
        double r62299 = r62285 / r62295;
        double r62300 = -r62299;
        double r62301 = pow(r62298, r62300);
        double r62302 = r62293 * r62301;
        double r62303 = r62290 + r62302;
        return r62303;
}

double f(double F, double B, double x) {
        double r62304 = 2.0;
        double r62305 = x;
        double r62306 = F;
        double r62307 = fma(r62306, r62306, r62304);
        double r62308 = fma(r62304, r62305, r62307);
        double r62309 = 1.0;
        double r62310 = cbrt(r62309);
        double r62311 = r62310 * r62310;
        double r62312 = -r62311;
        double r62313 = pow(r62308, r62312);
        double r62314 = r62310 / r62304;
        double r62315 = pow(r62313, r62314);
        double r62316 = 1.0;
        double r62317 = B;
        double r62318 = sin(r62317);
        double r62319 = r62316 / r62318;
        double r62320 = r62306 * r62319;
        double r62321 = r62305 * r62309;
        double r62322 = tan(r62317);
        double r62323 = r62321 / r62322;
        double r62324 = -r62323;
        double r62325 = fma(r62315, r62320, r62324);
        return r62325;
}

Error

Bits error versus F

Bits error versus B

Bits error versus x

Derivation

  1. Initial program 13.7

    \[\left(-x \cdot \frac{1}{\tan B}\right) + \frac{F}{\sin B} \cdot {\left(\left(F \cdot F + 2\right) + 2 \cdot x\right)}^{\left(-\frac{1}{2}\right)}\]
  2. Simplified13.7

    \[\leadsto \color{blue}{\mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\frac{1}{2}\right)}, \frac{F}{\sin B}, -x \cdot \frac{1}{\tan B}\right)}\]
  3. Using strategy rm
  4. Applied associate-*r/13.6

    \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\frac{1}{2}\right)}, \frac{F}{\sin B}, -\color{blue}{\frac{x \cdot 1}{\tan B}}\right)\]
  5. Using strategy rm
  6. Applied div-inv13.6

    \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\frac{1}{2}\right)}, \color{blue}{F \cdot \frac{1}{\sin B}}, -\frac{x \cdot 1}{\tan B}\right)\]
  7. Using strategy rm
  8. Applied *-un-lft-identity13.6

    \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\frac{1}{\color{blue}{1 \cdot 2}}\right)}, F \cdot \frac{1}{\sin B}, -\frac{x \cdot 1}{\tan B}\right)\]
  9. Applied add-cube-cbrt13.6

    \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{1 \cdot 2}\right)}, F \cdot \frac{1}{\sin B}, -\frac{x \cdot 1}{\tan B}\right)\]
  10. Applied times-frac13.6

    \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\color{blue}{\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1} \cdot \frac{\sqrt[3]{1}}{2}}\right)}, F \cdot \frac{1}{\sin B}, -\frac{x \cdot 1}{\tan B}\right)\]
  11. Applied distribute-lft-neg-in13.6

    \[\leadsto \mathsf{fma}\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\color{blue}{\left(\left(-\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}\right) \cdot \frac{\sqrt[3]{1}}{2}\right)}}, F \cdot \frac{1}{\sin B}, -\frac{x \cdot 1}{\tan B}\right)\]
  12. Applied pow-unpow13.6

    \[\leadsto \mathsf{fma}\left(\color{blue}{{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}\right)}\right)}^{\left(\frac{\sqrt[3]{1}}{2}\right)}}, F \cdot \frac{1}{\sin B}, -\frac{x \cdot 1}{\tan B}\right)\]
  13. Simplified13.6

    \[\leadsto \mathsf{fma}\left({\color{blue}{\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\sqrt[3]{1} \cdot \sqrt[3]{1}\right)}\right)}}^{\left(\frac{\sqrt[3]{1}}{2}\right)}, F \cdot \frac{1}{\sin B}, -\frac{x \cdot 1}{\tan B}\right)\]
  14. Final simplification13.6

    \[\leadsto \mathsf{fma}\left({\left({\left(\mathsf{fma}\left(2, x, \mathsf{fma}\left(F, F, 2\right)\right)\right)}^{\left(-\sqrt[3]{1} \cdot \sqrt[3]{1}\right)}\right)}^{\left(\frac{\sqrt[3]{1}}{2}\right)}, F \cdot \frac{1}{\sin B}, -\frac{x \cdot 1}{\tan B}\right)\]

Reproduce

herbie shell --seed 2019325 +o rules:numerics
(FPCore (F B x)
  :name "VandenBroeck and Keller, Equation (23)"
  :precision binary64
  (+ (- (* x (/ 1 (tan B)))) (* (/ F (sin B)) (pow (+ (+ (* F F) 2) (* 2 x)) (- (/ 1 2))))))