Average Error: 1.9 → 2.1
Time: 20.1s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\frac{e^{\left(-\log a\right) \cdot \left(1 - t\right) - \left(b - y \cdot \log z\right)}}{y} \cdot x\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\frac{e^{\left(-\log a\right) \cdot \left(1 - t\right) - \left(b - y \cdot \log z\right)}}{y} \cdot x
double f(double x, double y, double z, double t, double a, double b) {
        double r711541 = x;
        double r711542 = y;
        double r711543 = z;
        double r711544 = log(r711543);
        double r711545 = r711542 * r711544;
        double r711546 = t;
        double r711547 = 1.0;
        double r711548 = r711546 - r711547;
        double r711549 = a;
        double r711550 = log(r711549);
        double r711551 = r711548 * r711550;
        double r711552 = r711545 + r711551;
        double r711553 = b;
        double r711554 = r711552 - r711553;
        double r711555 = exp(r711554);
        double r711556 = r711541 * r711555;
        double r711557 = r711556 / r711542;
        return r711557;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r711558 = a;
        double r711559 = log(r711558);
        double r711560 = -r711559;
        double r711561 = 1.0;
        double r711562 = t;
        double r711563 = r711561 - r711562;
        double r711564 = r711560 * r711563;
        double r711565 = b;
        double r711566 = y;
        double r711567 = z;
        double r711568 = log(r711567);
        double r711569 = r711566 * r711568;
        double r711570 = r711565 - r711569;
        double r711571 = r711564 - r711570;
        double r711572 = exp(r711571);
        double r711573 = r711572 / r711566;
        double r711574 = x;
        double r711575 = r711573 * r711574;
        return r711575;
}

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
Herbie2.1
\[\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 \color{blue}{\frac{x \cdot 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. Simplified2.1

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

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

Reproduce

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