Average Error: 2.0 → 2.0
Time: 32.8s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
double f(double x, double y, double z, double t, double a, double b) {
        double r295733 = x;
        double r295734 = y;
        double r295735 = z;
        double r295736 = log(r295735);
        double r295737 = r295734 * r295736;
        double r295738 = t;
        double r295739 = 1.0;
        double r295740 = r295738 - r295739;
        double r295741 = a;
        double r295742 = log(r295741);
        double r295743 = r295740 * r295742;
        double r295744 = r295737 + r295743;
        double r295745 = b;
        double r295746 = r295744 - r295745;
        double r295747 = exp(r295746);
        double r295748 = r295733 * r295747;
        double r295749 = r295748 / r295734;
        return r295749;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r295750 = x;
        double r295751 = y;
        double r295752 = z;
        double r295753 = log(r295752);
        double r295754 = r295751 * r295753;
        double r295755 = t;
        double r295756 = 1.0;
        double r295757 = r295755 - r295756;
        double r295758 = a;
        double r295759 = log(r295758);
        double r295760 = r295757 * r295759;
        double r295761 = r295754 + r295760;
        double r295762 = b;
        double r295763 = r295761 - r295762;
        double r295764 = exp(r295763);
        double r295765 = r295750 * r295764;
        double r295766 = r295765 / r295751;
        return r295766;
}

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

Original2.0
Target11.2
Herbie2.0
\[\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 2.0

    \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity2.0

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

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

Reproduce

herbie shell --seed 2019303 +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.88458485041274715) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))) (if (< t 852031.22883740731) (/ (* (/ 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))