Average Error: 1.9 → 1.2
Time: 13.0s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\left(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)}}\right) \cdot \frac{1}{y}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\left(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)}}\right) \cdot \frac{1}{y}
double f(double x, double y, double z, double t, double a, double b) {
        double r426507 = x;
        double r426508 = y;
        double r426509 = z;
        double r426510 = log(r426509);
        double r426511 = r426508 * r426510;
        double r426512 = t;
        double r426513 = 1.0;
        double r426514 = r426512 - r426513;
        double r426515 = a;
        double r426516 = log(r426515);
        double r426517 = r426514 * r426516;
        double r426518 = r426511 + r426517;
        double r426519 = b;
        double r426520 = r426518 - r426519;
        double r426521 = exp(r426520);
        double r426522 = r426507 * r426521;
        double r426523 = r426522 / r426508;
        return r426523;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r426524 = x;
        double r426525 = 1.0;
        double r426526 = a;
        double r426527 = r426525 / r426526;
        double r426528 = 1.0;
        double r426529 = pow(r426527, r426528);
        double r426530 = y;
        double r426531 = z;
        double r426532 = r426525 / r426531;
        double r426533 = log(r426532);
        double r426534 = r426530 * r426533;
        double r426535 = log(r426527);
        double r426536 = t;
        double r426537 = r426535 * r426536;
        double r426538 = b;
        double r426539 = r426537 + r426538;
        double r426540 = r426534 + r426539;
        double r426541 = exp(r426540);
        double r426542 = r426529 / r426541;
        double r426543 = r426524 * r426542;
        double r426544 = r426525 / r426530;
        double r426545 = r426543 * r426544;
        return r426545;
}

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.7
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. Using strategy rm
  5. Applied div-inv1.2

    \[\leadsto \color{blue}{\left(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)}}\right) \cdot \frac{1}{y}}\]
  6. Final simplification1.2

    \[\leadsto \left(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)}}\right) \cdot \frac{1}{y}\]

Reproduce

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