Average Error: 1.8 → 1.9
Time: 36.4s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}{y}\]
\[\frac{x}{\frac{\frac{\frac{y}{\sqrt[3]{e^{\mathsf{fma}\left(\log a, t - 1.0, \log z \cdot y\right) - b}}}}{\sqrt[3]{{e}^{\left(\mathsf{fma}\left(\log a, t - 1.0, \log z \cdot y\right) - b\right)}}}}{\sqrt[3]{{e}^{\left(\mathsf{fma}\left(\log a, t - 1.0, \log z \cdot y\right) - b\right)}}}}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}{y}
\frac{x}{\frac{\frac{\frac{y}{\sqrt[3]{e^{\mathsf{fma}\left(\log a, t - 1.0, \log z \cdot y\right) - b}}}}{\sqrt[3]{{e}^{\left(\mathsf{fma}\left(\log a, t - 1.0, \log z \cdot y\right) - b\right)}}}}{\sqrt[3]{{e}^{\left(\mathsf{fma}\left(\log a, t - 1.0, \log z \cdot y\right) - b\right)}}}}
double f(double x, double y, double z, double t, double a, double b) {
        double r8021733 = x;
        double r8021734 = y;
        double r8021735 = z;
        double r8021736 = log(r8021735);
        double r8021737 = r8021734 * r8021736;
        double r8021738 = t;
        double r8021739 = 1.0;
        double r8021740 = r8021738 - r8021739;
        double r8021741 = a;
        double r8021742 = log(r8021741);
        double r8021743 = r8021740 * r8021742;
        double r8021744 = r8021737 + r8021743;
        double r8021745 = b;
        double r8021746 = r8021744 - r8021745;
        double r8021747 = exp(r8021746);
        double r8021748 = r8021733 * r8021747;
        double r8021749 = r8021748 / r8021734;
        return r8021749;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r8021750 = x;
        double r8021751 = y;
        double r8021752 = a;
        double r8021753 = log(r8021752);
        double r8021754 = t;
        double r8021755 = 1.0;
        double r8021756 = r8021754 - r8021755;
        double r8021757 = z;
        double r8021758 = log(r8021757);
        double r8021759 = r8021758 * r8021751;
        double r8021760 = fma(r8021753, r8021756, r8021759);
        double r8021761 = b;
        double r8021762 = r8021760 - r8021761;
        double r8021763 = exp(r8021762);
        double r8021764 = cbrt(r8021763);
        double r8021765 = r8021751 / r8021764;
        double r8021766 = exp(1.0);
        double r8021767 = pow(r8021766, r8021762);
        double r8021768 = cbrt(r8021767);
        double r8021769 = r8021765 / r8021768;
        double r8021770 = r8021769 / r8021768;
        double r8021771 = r8021750 / r8021770;
        return r8021771;
}

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.8
Target11.2
Herbie1.9
\[\begin{array}{l} \mathbf{if}\;t \lt -0.8845848504127471:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{\left(t - 1.0\right)}}{y}}{\left(b + 1\right) - y \cdot \log z}\\ \mathbf{elif}\;t \lt 852031.2288374073:\\ \;\;\;\;\frac{\frac{x}{y} \cdot {a}^{\left(t - 1.0\right)}}{e^{b - \log z \cdot y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{\left(t - 1.0\right)}}{y}}{\left(b + 1\right) - y \cdot \log z}\\ \end{array}\]

Derivation

  1. Initial program 1.8

    \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}{y}\]
  2. Using strategy rm
  3. Applied add-cube-cbrt1.8

    \[\leadsto \frac{x \cdot \color{blue}{\left(\left(\sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}} \cdot \sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}\right) \cdot \sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}\right)}}{y}\]
  4. Using strategy rm
  5. Applied *-un-lft-identity1.8

    \[\leadsto \frac{x \cdot \left(\left(\sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}} \cdot \sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}\right) \cdot \sqrt[3]{e^{\color{blue}{1 \cdot \left(\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b\right)}}}\right)}{y}\]
  6. Applied exp-prod1.8

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

    \[\leadsto \frac{x \cdot \left(\left(\sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}} \cdot \sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}\right) \cdot \sqrt[3]{{\color{blue}{e}}^{\left(\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b\right)}}\right)}{y}\]
  8. Using strategy rm
  9. Applied *-un-lft-identity1.8

    \[\leadsto \frac{x \cdot \left(\left(\sqrt[3]{e^{\color{blue}{1 \cdot \left(\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b\right)}}} \cdot \sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}\right) \cdot \sqrt[3]{{e}^{\left(\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b\right)}}\right)}{y}\]
  10. Applied exp-prod1.9

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

    \[\leadsto \frac{x \cdot \left(\left(\sqrt[3]{{\color{blue}{e}}^{\left(\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b\right)}} \cdot \sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}\right) \cdot \sqrt[3]{{e}^{\left(\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b\right)}}\right)}{y}\]
  12. Using strategy rm
  13. Applied associate-/l*1.9

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

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

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

Reproduce

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

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

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