Average Error: 1.9 → 1.2
Time: 15.3s
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{{\left(\frac{1}{a}\right)}^{1}}{e^{y \cdot \log \left(\frac{1}{z}\right) + \left(\log \left(\frac{1}{a}\right) \cdot t + b\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{{\left(\frac{1}{a}\right)}^{1}}{e^{y \cdot \log \left(\frac{1}{z}\right) + \left(\log \left(\frac{1}{a}\right) \cdot t + b\right)}}}{y}
double f(double x, double y, double z, double t, double a, double b) {
        double r501374 = x;
        double r501375 = y;
        double r501376 = z;
        double r501377 = log(r501376);
        double r501378 = r501375 * r501377;
        double r501379 = t;
        double r501380 = 1.0;
        double r501381 = r501379 - r501380;
        double r501382 = a;
        double r501383 = log(r501382);
        double r501384 = r501381 * r501383;
        double r501385 = r501378 + r501384;
        double r501386 = b;
        double r501387 = r501385 - r501386;
        double r501388 = exp(r501387);
        double r501389 = r501374 * r501388;
        double r501390 = r501389 / r501375;
        return r501390;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r501391 = x;
        double r501392 = 1.0;
        double r501393 = a;
        double r501394 = r501392 / r501393;
        double r501395 = 1.0;
        double r501396 = pow(r501394, r501395);
        double r501397 = y;
        double r501398 = z;
        double r501399 = r501392 / r501398;
        double r501400 = log(r501399);
        double r501401 = r501397 * r501400;
        double r501402 = log(r501394);
        double r501403 = t;
        double r501404 = r501402 * r501403;
        double r501405 = b;
        double r501406 = r501404 + r501405;
        double r501407 = r501401 + r501406;
        double r501408 = exp(r501407);
        double r501409 = r501396 / r501408;
        double r501410 = r501391 * r501409;
        double r501411 = r501410 / r501397;
        return r501411;
}

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

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

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

Reproduce

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