Average Error: 2.1 → 2.1
Time: 39.5s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\left(x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}\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 e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}\right) \cdot \frac{1}{y}
double f(double x, double y, double z, double t, double a, double b) {
        double r334106 = x;
        double r334107 = y;
        double r334108 = z;
        double r334109 = log(r334108);
        double r334110 = r334107 * r334109;
        double r334111 = t;
        double r334112 = 1.0;
        double r334113 = r334111 - r334112;
        double r334114 = a;
        double r334115 = log(r334114);
        double r334116 = r334113 * r334115;
        double r334117 = r334110 + r334116;
        double r334118 = b;
        double r334119 = r334117 - r334118;
        double r334120 = exp(r334119);
        double r334121 = r334106 * r334120;
        double r334122 = r334121 / r334107;
        return r334122;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r334123 = x;
        double r334124 = y;
        double r334125 = z;
        double r334126 = log(r334125);
        double r334127 = r334124 * r334126;
        double r334128 = t;
        double r334129 = 1.0;
        double r334130 = r334128 - r334129;
        double r334131 = a;
        double r334132 = log(r334131);
        double r334133 = r334130 * r334132;
        double r334134 = r334127 + r334133;
        double r334135 = b;
        double r334136 = r334134 - r334135;
        double r334137 = exp(r334136);
        double r334138 = r334123 * r334137;
        double r334139 = 1.0;
        double r334140 = r334139 / r334124;
        double r334141 = r334138 * r334140;
        return r334141;
}

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.1
Target10.9
Herbie2.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 2.1

    \[\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 div-inv2.1

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

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

Reproduce

herbie shell --seed 2019325 +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))