Average Error: 2.0 → 2.0
Time: 35.5s
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 r339132 = x;
        double r339133 = y;
        double r339134 = z;
        double r339135 = log(r339134);
        double r339136 = r339133 * r339135;
        double r339137 = t;
        double r339138 = 1.0;
        double r339139 = r339137 - r339138;
        double r339140 = a;
        double r339141 = log(r339140);
        double r339142 = r339139 * r339141;
        double r339143 = r339136 + r339142;
        double r339144 = b;
        double r339145 = r339143 - r339144;
        double r339146 = exp(r339145);
        double r339147 = r339132 * r339146;
        double r339148 = r339147 / r339133;
        return r339148;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r339149 = x;
        double r339150 = y;
        double r339151 = z;
        double r339152 = log(r339151);
        double r339153 = r339150 * r339152;
        double r339154 = t;
        double r339155 = 1.0;
        double r339156 = r339154 - r339155;
        double r339157 = a;
        double r339158 = log(r339157);
        double r339159 = r339156 * r339158;
        double r339160 = r339153 + r339159;
        double r339161 = b;
        double r339162 = r339160 - r339161;
        double r339163 = exp(r339162);
        double r339164 = r339149 * r339163;
        double r339165 = r339164 / r339150;
        return r339165;
}

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 pow12.0

    \[\leadsto \color{blue}{{\left(\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\right)}^{1}}\]
  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))