Average Error: 1.9 → 1.5
Time: 30.8s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\frac{x}{\left(y \cdot e^{\left(b - \log a \cdot t\right) - \log z \cdot y}\right) \cdot \frac{1}{{a}^{\left(-1\right)}}}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\frac{x}{\left(y \cdot e^{\left(b - \log a \cdot t\right) - \log z \cdot y}\right) \cdot \frac{1}{{a}^{\left(-1\right)}}}
double f(double x, double y, double z, double t, double a, double b) {
        double r944067 = x;
        double r944068 = y;
        double r944069 = z;
        double r944070 = log(r944069);
        double r944071 = r944068 * r944070;
        double r944072 = t;
        double r944073 = 1.0;
        double r944074 = r944072 - r944073;
        double r944075 = a;
        double r944076 = log(r944075);
        double r944077 = r944074 * r944076;
        double r944078 = r944071 + r944077;
        double r944079 = b;
        double r944080 = r944078 - r944079;
        double r944081 = exp(r944080);
        double r944082 = r944067 * r944081;
        double r944083 = r944082 / r944068;
        return r944083;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r944084 = x;
        double r944085 = y;
        double r944086 = b;
        double r944087 = a;
        double r944088 = log(r944087);
        double r944089 = t;
        double r944090 = r944088 * r944089;
        double r944091 = r944086 - r944090;
        double r944092 = z;
        double r944093 = log(r944092);
        double r944094 = r944093 * r944085;
        double r944095 = r944091 - r944094;
        double r944096 = exp(r944095);
        double r944097 = r944085 * r944096;
        double r944098 = 1.0;
        double r944099 = 1.0;
        double r944100 = -r944099;
        double r944101 = pow(r944087, r944100);
        double r944102 = r944098 / r944101;
        double r944103 = r944097 * r944102;
        double r944104 = r944084 / r944103;
        return r944104;
}

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

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original1.9
Target11.1
Herbie1.5
\[\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 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 1.9

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

    \[\leadsto \frac{x \cdot \color{blue}{\frac{{a}^{\left(-1\right)}}{e^{\left(\left(-\log z\right) \cdot y + \left(-\log a\right) \cdot t\right) + b}}}}{y}\]
  4. Using strategy rm
  5. Applied associate-/l*1.5

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

    \[\leadsto \frac{x}{\color{blue}{\frac{y \cdot e^{\left(b - \log a \cdot t\right) - \log z \cdot y}}{{a}^{\left(-1\right)}}}}\]
  7. Using strategy rm
  8. Applied div-inv1.5

    \[\leadsto \frac{x}{\color{blue}{\left(y \cdot e^{\left(b - \log a \cdot t\right) - \log z \cdot y}\right) \cdot \frac{1}{{a}^{\left(-1\right)}}}}\]
  9. Final simplification1.5

    \[\leadsto \frac{x}{\left(y \cdot e^{\left(b - \log a \cdot t\right) - \log z \cdot y}\right) \cdot \frac{1}{{a}^{\left(-1\right)}}}\]

Reproduce

herbie shell --seed 2019209 
(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.88458485041274715) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))) (if (< t 852031.22883740731) (/ (* (/ 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))