Average Error: 1.9 → 2.0
Time: 19.5s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\frac{x}{\frac{y}{e^{\left(-\log a\right) \cdot \left(1 - t\right) - \left(b - y \cdot \log z\right)}}}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\frac{x}{\frac{y}{e^{\left(-\log a\right) \cdot \left(1 - t\right) - \left(b - y \cdot \log z\right)}}}
double f(double x, double y, double z, double t, double a, double b) {
        double r513519 = x;
        double r513520 = y;
        double r513521 = z;
        double r513522 = log(r513521);
        double r513523 = r513520 * r513522;
        double r513524 = t;
        double r513525 = 1.0;
        double r513526 = r513524 - r513525;
        double r513527 = a;
        double r513528 = log(r513527);
        double r513529 = r513526 * r513528;
        double r513530 = r513523 + r513529;
        double r513531 = b;
        double r513532 = r513530 - r513531;
        double r513533 = exp(r513532);
        double r513534 = r513519 * r513533;
        double r513535 = r513534 / r513520;
        return r513535;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r513536 = x;
        double r513537 = y;
        double r513538 = a;
        double r513539 = log(r513538);
        double r513540 = -r513539;
        double r513541 = 1.0;
        double r513542 = t;
        double r513543 = r513541 - r513542;
        double r513544 = r513540 * r513543;
        double r513545 = b;
        double r513546 = z;
        double r513547 = log(r513546);
        double r513548 = r513537 * r513547;
        double r513549 = r513545 - r513548;
        double r513550 = r513544 - r513549;
        double r513551 = exp(r513550);
        double r513552 = r513537 / r513551;
        double r513553 = r513536 / r513552;
        return r513553;
}

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

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

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

Reproduce

herbie shell --seed 2020042 +o rules:numerics
(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))