Average Error: 2.0 → 1.4
Time: 15.6s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\frac{1}{\frac{y}{\left(x \cdot \frac{{\left(\frac{1}{\sqrt{a}}\right)}^{1}}{\sqrt[3]{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[3]{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{1}}{\sqrt{a}}\right)}^{1}}{\left(\sqrt[3]{\sqrt[3]{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[3]{\sqrt[3]{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[3]{\sqrt[3]{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}}}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\frac{1}{\frac{y}{\left(x \cdot \frac{{\left(\frac{1}{\sqrt{a}}\right)}^{1}}{\sqrt[3]{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[3]{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{1}}{\sqrt{a}}\right)}^{1}}{\left(\sqrt[3]{\sqrt[3]{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[3]{\sqrt[3]{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[3]{\sqrt[3]{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}}}
double f(double x, double y, double z, double t, double a, double b) {
        double r441013 = x;
        double r441014 = y;
        double r441015 = z;
        double r441016 = log(r441015);
        double r441017 = r441014 * r441016;
        double r441018 = t;
        double r441019 = 1.0;
        double r441020 = r441018 - r441019;
        double r441021 = a;
        double r441022 = log(r441021);
        double r441023 = r441020 * r441022;
        double r441024 = r441017 + r441023;
        double r441025 = b;
        double r441026 = r441024 - r441025;
        double r441027 = exp(r441026);
        double r441028 = r441013 * r441027;
        double r441029 = r441028 / r441014;
        return r441029;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r441030 = 1.0;
        double r441031 = y;
        double r441032 = x;
        double r441033 = a;
        double r441034 = sqrt(r441033);
        double r441035 = r441030 / r441034;
        double r441036 = 1.0;
        double r441037 = pow(r441035, r441036);
        double r441038 = z;
        double r441039 = r441030 / r441038;
        double r441040 = log(r441039);
        double r441041 = r441030 / r441033;
        double r441042 = log(r441041);
        double r441043 = t;
        double r441044 = b;
        double r441045 = fma(r441042, r441043, r441044);
        double r441046 = fma(r441031, r441040, r441045);
        double r441047 = exp(r441046);
        double r441048 = cbrt(r441047);
        double r441049 = r441048 * r441048;
        double r441050 = r441037 / r441049;
        double r441051 = r441032 * r441050;
        double r441052 = sqrt(r441030);
        double r441053 = r441052 / r441034;
        double r441054 = pow(r441053, r441036);
        double r441055 = cbrt(r441048);
        double r441056 = r441055 * r441055;
        double r441057 = r441056 * r441055;
        double r441058 = r441054 / r441057;
        double r441059 = r441051 * r441058;
        double r441060 = r441031 / r441059;
        double r441061 = r441030 / r441060;
        return r441061;
}

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

Original2.0
Target11.2
Herbie1.4
\[\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 2.0

    \[\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.3

    \[\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-cube-cbrt1.4

    \[\leadsto \frac{x \cdot \frac{{\left(\frac{1}{a}\right)}^{1}}{\color{blue}{\left(\sqrt[3]{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[3]{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[3]{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 add-sqr-sqrt1.4

    \[\leadsto \frac{x \cdot \frac{{\left(\frac{1}{\color{blue}{\sqrt{a} \cdot \sqrt{a}}}\right)}^{1}}{\left(\sqrt[3]{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[3]{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[3]{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-sqr-sqrt1.4

    \[\leadsto \frac{x \cdot \frac{{\left(\frac{\color{blue}{\sqrt{1} \cdot \sqrt{1}}}{\sqrt{a} \cdot \sqrt{a}}\right)}^{1}}{\left(\sqrt[3]{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[3]{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[3]{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.4

    \[\leadsto \frac{x \cdot \frac{{\color{blue}{\left(\frac{\sqrt{1}}{\sqrt{a}} \cdot \frac{\sqrt{1}}{\sqrt{a}}\right)}}^{1}}{\left(\sqrt[3]{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[3]{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[3]{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.4

    \[\leadsto \frac{x \cdot \frac{\color{blue}{{\left(\frac{\sqrt{1}}{\sqrt{a}}\right)}^{1} \cdot {\left(\frac{\sqrt{1}}{\sqrt{a}}\right)}^{1}}}{\left(\sqrt[3]{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[3]{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[3]{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.4

    \[\leadsto \frac{x \cdot \color{blue}{\left(\frac{{\left(\frac{\sqrt{1}}{\sqrt{a}}\right)}^{1}}{\sqrt[3]{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[3]{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{1}}{\sqrt{a}}\right)}^{1}}{\sqrt[3]{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.4

    \[\leadsto \frac{\color{blue}{\left(x \cdot \frac{{\left(\frac{\sqrt{1}}{\sqrt{a}}\right)}^{1}}{\sqrt[3]{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[3]{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{1}}{\sqrt{a}}\right)}^{1}}{\sqrt[3]{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. Simplified1.4

    \[\leadsto \frac{\color{blue}{\left(x \cdot \frac{{\left(\frac{1}{\sqrt{a}}\right)}^{1}}{\sqrt[3]{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[3]{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{1}}{\sqrt{a}}\right)}^{1}}{\sqrt[3]{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}\]
  13. Using strategy rm
  14. Applied clear-num1.4

    \[\leadsto \color{blue}{\frac{1}{\frac{y}{\left(x \cdot \frac{{\left(\frac{1}{\sqrt{a}}\right)}^{1}}{\sqrt[3]{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[3]{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{1}}{\sqrt{a}}\right)}^{1}}{\sqrt[3]{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}}}\]
  15. Using strategy rm
  16. Applied add-cube-cbrt1.4

    \[\leadsto \frac{1}{\frac{y}{\left(x \cdot \frac{{\left(\frac{1}{\sqrt{a}}\right)}^{1}}{\sqrt[3]{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[3]{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{1}}{\sqrt{a}}\right)}^{1}}{\color{blue}{\left(\sqrt[3]{\sqrt[3]{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[3]{\sqrt[3]{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[3]{\sqrt[3]{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}}}}\]
  17. Final simplification1.4

    \[\leadsto \frac{1}{\frac{y}{\left(x \cdot \frac{{\left(\frac{1}{\sqrt{a}}\right)}^{1}}{\sqrt[3]{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[3]{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{1}}{\sqrt{a}}\right)}^{1}}{\left(\sqrt[3]{\sqrt[3]{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[3]{\sqrt[3]{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[3]{\sqrt[3]{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}}}\]

Reproduce

herbie shell --seed 2020047 +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))