Average Error: 2.0 → 2.1
Time: 17.2s
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(\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b\right)}}{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(\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b\right)}}{y}
double f(double x, double y, double z, double t, double a, double b) {
        double r364290 = x;
        double r364291 = y;
        double r364292 = z;
        double r364293 = log(r364292);
        double r364294 = r364291 * r364293;
        double r364295 = t;
        double r364296 = 1.0;
        double r364297 = r364295 - r364296;
        double r364298 = a;
        double r364299 = log(r364298);
        double r364300 = r364297 * r364299;
        double r364301 = r364294 + r364300;
        double r364302 = b;
        double r364303 = r364301 - r364302;
        double r364304 = exp(r364303);
        double r364305 = r364290 * r364304;
        double r364306 = r364305 / r364291;
        return r364306;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r364307 = x;
        double r364308 = exp(1.0);
        double r364309 = y;
        double r364310 = z;
        double r364311 = log(r364310);
        double r364312 = r364309 * r364311;
        double r364313 = t;
        double r364314 = 1.0;
        double r364315 = r364313 - r364314;
        double r364316 = a;
        double r364317 = log(r364316);
        double r364318 = r364315 * r364317;
        double r364319 = r364312 + r364318;
        double r364320 = b;
        double r364321 = r364319 - r364320;
        double r364322 = pow(r364308, r364321);
        double r364323 = r364307 * r364322;
        double r364324 = r364323 / r364309;
        return r364324;
}

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.0
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.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 e^{\color{blue}{1 \cdot \left(\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b\right)}}}{y}\]
  4. Applied exp-prod2.1

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

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

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

Reproduce

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