Average Error: 1.9 → 1.2
Time: 12.2s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\frac{\left(x \cdot \frac{{\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}\right)}^{1}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}\right) \cdot \frac{{\left(\frac{\sqrt[3]{1}}{a}\right)}^{1}}{\sqrt{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}} \cdot \sqrt{\sqrt[3]{{\left(\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}\right)}^{3}}}}}{y}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\frac{\left(x \cdot \frac{{\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}\right)}^{1}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}\right) \cdot \frac{{\left(\frac{\sqrt[3]{1}}{a}\right)}^{1}}{\sqrt{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}} \cdot \sqrt{\sqrt[3]{{\left(\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}\right)}^{3}}}}}{y}
double f(double x, double y, double z, double t, double a, double b) {
        double r366424 = x;
        double r366425 = y;
        double r366426 = z;
        double r366427 = log(r366426);
        double r366428 = r366425 * r366427;
        double r366429 = t;
        double r366430 = 1.0;
        double r366431 = r366429 - r366430;
        double r366432 = a;
        double r366433 = log(r366432);
        double r366434 = r366431 * r366433;
        double r366435 = r366428 + r366434;
        double r366436 = b;
        double r366437 = r366435 - r366436;
        double r366438 = exp(r366437);
        double r366439 = r366424 * r366438;
        double r366440 = r366439 / r366425;
        return r366440;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r366441 = x;
        double r366442 = 1.0;
        double r366443 = cbrt(r366442);
        double r366444 = r366443 * r366443;
        double r366445 = r366444 / r366442;
        double r366446 = 1.0;
        double r366447 = pow(r366445, r366446);
        double r366448 = y;
        double r366449 = z;
        double r366450 = r366442 / r366449;
        double r366451 = log(r366450);
        double r366452 = a;
        double r366453 = r366442 / r366452;
        double r366454 = log(r366453);
        double r366455 = t;
        double r366456 = b;
        double r366457 = fma(r366454, r366455, r366456);
        double r366458 = fma(r366448, r366451, r366457);
        double r366459 = exp(r366458);
        double r366460 = sqrt(r366459);
        double r366461 = r366447 / r366460;
        double r366462 = r366441 * r366461;
        double r366463 = r366443 / r366452;
        double r366464 = pow(r366463, r366446);
        double r366465 = sqrt(r366460);
        double r366466 = 3.0;
        double r366467 = pow(r366460, r366466);
        double r366468 = cbrt(r366467);
        double r366469 = sqrt(r366468);
        double r366470 = r366465 * r366469;
        double r366471 = r366464 / r366470;
        double r366472 = r366462 * r366471;
        double r366473 = r366472 / r366448;
        return r366473;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Bits error versus b

Target

Original1.9
Target11.0
Herbie1.2
\[\begin{array}{l} \mathbf{if}\;t \lt -0.88458485041274715:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{\left(t - 1\right)}}{y}}{\left(b + 1\right) - y \cdot \log z}\\ \mathbf{elif}\;t \lt 852031.22883740731:\\ \;\;\;\;\frac{\frac{x}{y} \cdot {a}^{\left(t - 1\right)}}{e^{b - \log z \cdot y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{\left(t - 1\right)}}{y}}{\left(b + 1\right) - y \cdot \log z}\\ \end{array}\]

Derivation

  1. Initial program 1.9

    \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
  2. Taylor expanded around inf 2.0

    \[\leadsto \frac{x \cdot \color{blue}{e^{1 \cdot \log \left(\frac{1}{a}\right) - \left(y \cdot \log \left(\frac{1}{z}\right) + \left(\log \left(\frac{1}{a}\right) \cdot t + b\right)\right)}}}{y}\]
  3. Simplified1.2

    \[\leadsto \frac{x \cdot \color{blue}{\frac{{\left(\frac{1}{a}\right)}^{1}}{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}{y}\]
  4. Using strategy rm
  5. Applied add-sqr-sqrt1.2

    \[\leadsto \frac{x \cdot \frac{{\left(\frac{1}{a}\right)}^{1}}{\color{blue}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}} \cdot \sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}}{y}\]
  6. Applied *-un-lft-identity1.2

    \[\leadsto \frac{x \cdot \frac{{\left(\frac{1}{\color{blue}{1 \cdot a}}\right)}^{1}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}} \cdot \sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}{y}\]
  7. Applied add-cube-cbrt1.2

    \[\leadsto \frac{x \cdot \frac{{\left(\frac{\color{blue}{\left(\sqrt[3]{1} \cdot \sqrt[3]{1}\right) \cdot \sqrt[3]{1}}}{1 \cdot a}\right)}^{1}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}} \cdot \sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}{y}\]
  8. Applied times-frac1.2

    \[\leadsto \frac{x \cdot \frac{{\color{blue}{\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1} \cdot \frac{\sqrt[3]{1}}{a}\right)}}^{1}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}} \cdot \sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}{y}\]
  9. Applied unpow-prod-down1.2

    \[\leadsto \frac{x \cdot \frac{\color{blue}{{\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}\right)}^{1} \cdot {\left(\frac{\sqrt[3]{1}}{a}\right)}^{1}}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}} \cdot \sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}{y}\]
  10. Applied times-frac1.2

    \[\leadsto \frac{x \cdot \color{blue}{\left(\frac{{\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}\right)}^{1}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}} \cdot \frac{{\left(\frac{\sqrt[3]{1}}{a}\right)}^{1}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}\right)}}{y}\]
  11. Applied associate-*r*1.2

    \[\leadsto \frac{\color{blue}{\left(x \cdot \frac{{\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}\right)}^{1}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}\right) \cdot \frac{{\left(\frac{\sqrt[3]{1}}{a}\right)}^{1}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}}{y}\]
  12. Using strategy rm
  13. Applied add-sqr-sqrt1.2

    \[\leadsto \frac{\left(x \cdot \frac{{\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}\right)}^{1}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}\right) \cdot \frac{{\left(\frac{\sqrt[3]{1}}{a}\right)}^{1}}{\sqrt{\color{blue}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}} \cdot \sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}}}{y}\]
  14. Applied sqrt-prod1.2

    \[\leadsto \frac{\left(x \cdot \frac{{\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}\right)}^{1}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}\right) \cdot \frac{{\left(\frac{\sqrt[3]{1}}{a}\right)}^{1}}{\color{blue}{\sqrt{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}} \cdot \sqrt{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}}}{y}\]
  15. Using strategy rm
  16. Applied add-cbrt-cube1.2

    \[\leadsto \frac{\left(x \cdot \frac{{\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}\right)}^{1}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}\right) \cdot \frac{{\left(\frac{\sqrt[3]{1}}{a}\right)}^{1}}{\sqrt{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}} \cdot \sqrt{\color{blue}{\sqrt[3]{\left(\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}} \cdot \sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}\right) \cdot \sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}}}}{y}\]
  17. Simplified1.2

    \[\leadsto \frac{\left(x \cdot \frac{{\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}\right)}^{1}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}\right) \cdot \frac{{\left(\frac{\sqrt[3]{1}}{a}\right)}^{1}}{\sqrt{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}} \cdot \sqrt{\sqrt[3]{\color{blue}{{\left(\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}\right)}^{3}}}}}}{y}\]
  18. Final simplification1.2

    \[\leadsto \frac{\left(x \cdot \frac{{\left(\frac{\sqrt[3]{1} \cdot \sqrt[3]{1}}{1}\right)}^{1}}{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}\right) \cdot \frac{{\left(\frac{\sqrt[3]{1}}{a}\right)}^{1}}{\sqrt{\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}} \cdot \sqrt{\sqrt[3]{{\left(\sqrt{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}\right)}^{3}}}}}{y}\]

Reproduce

herbie shell --seed 2020062 +o rules:numerics
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (if (< t -0.8845848504127471) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z))))))

  (/ (* x (exp (- (+ (* y (log z)) (* (- t 1) (log a))) b))) y))