Average Error: 2.2 → 1.4
Time: 34.1s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\frac{x \cdot \frac{{a}^{\left(-1\right)}}{e^{b + \left(-\left(\log a \cdot t + \log z \cdot y\right)\right)}}}{y}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\frac{x \cdot \frac{{a}^{\left(-1\right)}}{e^{b + \left(-\left(\log a \cdot t + \log z \cdot y\right)\right)}}}{y}
double f(double x, double y, double z, double t, double a, double b) {
        double r448262 = x;
        double r448263 = y;
        double r448264 = z;
        double r448265 = log(r448264);
        double r448266 = r448263 * r448265;
        double r448267 = t;
        double r448268 = 1.0;
        double r448269 = r448267 - r448268;
        double r448270 = a;
        double r448271 = log(r448270);
        double r448272 = r448269 * r448271;
        double r448273 = r448266 + r448272;
        double r448274 = b;
        double r448275 = r448273 - r448274;
        double r448276 = exp(r448275);
        double r448277 = r448262 * r448276;
        double r448278 = r448277 / r448263;
        return r448278;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r448279 = x;
        double r448280 = a;
        double r448281 = 1.0;
        double r448282 = -r448281;
        double r448283 = pow(r448280, r448282);
        double r448284 = b;
        double r448285 = log(r448280);
        double r448286 = t;
        double r448287 = r448285 * r448286;
        double r448288 = z;
        double r448289 = log(r448288);
        double r448290 = y;
        double r448291 = r448289 * r448290;
        double r448292 = r448287 + r448291;
        double r448293 = -r448292;
        double r448294 = r448284 + r448293;
        double r448295 = exp(r448294);
        double r448296 = r448283 / r448295;
        double r448297 = r448279 * r448296;
        double r448298 = r448297 / r448290;
        return r448298;
}

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

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

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

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

    \[\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. Final simplification1.4

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

Reproduce

herbie shell --seed 2019208 
(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))