Average Error: 2.0 → 1.0
Time: 26.7s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\frac{\frac{{\left({a}^{\left(-\frac{1}{2}\right)}\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} \cdot \left(\frac{{\left(\frac{1}{\sqrt{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 x\right)\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\frac{\frac{{\left({a}^{\left(-\frac{1}{2}\right)}\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} \cdot \left(\frac{{\left(\frac{1}{\sqrt{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 x\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r443156 = x;
        double r443157 = y;
        double r443158 = z;
        double r443159 = log(r443158);
        double r443160 = r443157 * r443159;
        double r443161 = t;
        double r443162 = 1.0;
        double r443163 = r443161 - r443162;
        double r443164 = a;
        double r443165 = log(r443164);
        double r443166 = r443163 * r443165;
        double r443167 = r443160 + r443166;
        double r443168 = b;
        double r443169 = r443167 - r443168;
        double r443170 = exp(r443169);
        double r443171 = r443156 * r443170;
        double r443172 = r443171 / r443157;
        return r443172;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r443173 = a;
        double r443174 = 0.5;
        double r443175 = -r443174;
        double r443176 = pow(r443173, r443175);
        double r443177 = 1.0;
        double r443178 = pow(r443176, r443177);
        double r443179 = y;
        double r443180 = 1.0;
        double r443181 = z;
        double r443182 = r443180 / r443181;
        double r443183 = log(r443182);
        double r443184 = r443180 / r443173;
        double r443185 = log(r443184);
        double r443186 = t;
        double r443187 = b;
        double r443188 = fma(r443185, r443186, r443187);
        double r443189 = fma(r443179, r443183, r443188);
        double r443190 = exp(r443189);
        double r443191 = sqrt(r443190);
        double r443192 = r443178 / r443191;
        double r443193 = r443192 / r443179;
        double r443194 = sqrt(r443173);
        double r443195 = r443180 / r443194;
        double r443196 = pow(r443195, r443177);
        double r443197 = r443196 / r443191;
        double r443198 = x;
        double r443199 = r443197 * r443198;
        double r443200 = r443193 * r443199;
        return r443200;
}

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.5
Herbie1.0
\[\begin{array}{l} \mathbf{if}\;t \lt -0.8845848504127471478852839936735108494759:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{\left(t - 1\right)}}{y}}{\left(b + 1\right) - y \cdot \log z}\\ \mathbf{elif}\;t \lt 852031.228837407310493290424346923828125:\\ \;\;\;\;\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 \color{blue}{\frac{x \cdot 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. Simplified6.2

    \[\leadsto \color{blue}{\frac{\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)}}}{\frac{y}{x}}}\]
  4. Using strategy rm
  5. Applied div-inv6.2

    \[\leadsto \frac{\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)}}}{\color{blue}{y \cdot \frac{1}{x}}}\]
  6. Applied add-sqr-sqrt6.2

    \[\leadsto \frac{\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 \cdot \frac{1}{x}}\]
  7. Applied add-sqr-sqrt6.2

    \[\leadsto \frac{\frac{{\left(\frac{1}{\color{blue}{\sqrt{a} \cdot \sqrt{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 \cdot \frac{1}{x}}\]
  8. Applied *-un-lft-identity6.2

    \[\leadsto \frac{\frac{{\left(\frac{\color{blue}{1 \cdot 1}}{\sqrt{a} \cdot \sqrt{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 \cdot \frac{1}{x}}\]
  9. Applied times-frac6.2

    \[\leadsto \frac{\frac{{\color{blue}{\left(\frac{1}{\sqrt{a}} \cdot \frac{1}{\sqrt{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 \cdot \frac{1}{x}}\]
  10. Applied unpow-prod-down6.2

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

    \[\leadsto \frac{\color{blue}{\frac{{\left(\frac{1}{\sqrt{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 \frac{{\left(\frac{1}{\sqrt{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 \cdot \frac{1}{x}}\]
  12. Applied times-frac1.0

    \[\leadsto \color{blue}{\frac{\frac{{\left(\frac{1}{\sqrt{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} \cdot \frac{\frac{{\left(\frac{1}{\sqrt{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)}}}}{\frac{1}{x}}}\]
  13. Simplified1.0

    \[\leadsto \frac{\frac{{\left(\frac{1}{\sqrt{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} \cdot \color{blue}{\left(\frac{{\left(\frac{1}{\sqrt{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 x\right)}\]
  14. Using strategy rm
  15. Applied pow1/21.0

    \[\leadsto \frac{\frac{{\left(\frac{1}{\color{blue}{{a}^{\frac{1}{2}}}}\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} \cdot \left(\frac{{\left(\frac{1}{\sqrt{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 x\right)\]
  16. Applied pow-flip1.0

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

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

Reproduce

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