Average Error: 1.9 → 1.1
Time: 14.7s
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 r468523 = x;
        double r468524 = y;
        double r468525 = z;
        double r468526 = log(r468525);
        double r468527 = r468524 * r468526;
        double r468528 = t;
        double r468529 = 1.0;
        double r468530 = r468528 - r468529;
        double r468531 = a;
        double r468532 = log(r468531);
        double r468533 = r468530 * r468532;
        double r468534 = r468527 + r468533;
        double r468535 = b;
        double r468536 = r468534 - r468535;
        double r468537 = exp(r468536);
        double r468538 = r468523 * r468537;
        double r468539 = r468538 / r468524;
        return r468539;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r468540 = x;
        double r468541 = 1.0;
        double r468542 = a;
        double r468543 = r468541 / r468542;
        double r468544 = 1.0;
        double r468545 = pow(r468543, r468544);
        double r468546 = y;
        double r468547 = z;
        double r468548 = r468541 / r468547;
        double r468549 = log(r468548);
        double r468550 = r468546 * r468549;
        double r468551 = log(r468543);
        double r468552 = t;
        double r468553 = r468551 * r468552;
        double r468554 = b;
        double r468555 = r468553 + r468554;
        double r468556 = r468550 + r468555;
        double r468557 = exp(r468556);
        double r468558 = r468545 / r468557;
        double r468559 = r468540 * r468558;
        double r468560 = r468559 / r468546;
        return r468560;
}

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
Target10.4
Herbie1.1
\[\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{{\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.1

    \[\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 2020001 
(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))