Average Error: 1.9 → 1.2
Time: 13.8s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\left(x \cdot \frac{{\left(\frac{1}{a}\right)}^{1}}{e^{y \cdot \log \left(\frac{1}{z}\right) + \left(\log \left(\frac{1}{a}\right) \cdot t + b\right)}}\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 \frac{{\left(\frac{1}{a}\right)}^{1}}{e^{y \cdot \log \left(\frac{1}{z}\right) + \left(\log \left(\frac{1}{a}\right) \cdot t + b\right)}}\right) \cdot \frac{1}{y}
double f(double x, double y, double z, double t, double a, double b) {
        double r466204 = x;
        double r466205 = y;
        double r466206 = z;
        double r466207 = log(r466206);
        double r466208 = r466205 * r466207;
        double r466209 = t;
        double r466210 = 1.0;
        double r466211 = r466209 - r466210;
        double r466212 = a;
        double r466213 = log(r466212);
        double r466214 = r466211 * r466213;
        double r466215 = r466208 + r466214;
        double r466216 = b;
        double r466217 = r466215 - r466216;
        double r466218 = exp(r466217);
        double r466219 = r466204 * r466218;
        double r466220 = r466219 / r466205;
        return r466220;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r466221 = x;
        double r466222 = 1.0;
        double r466223 = a;
        double r466224 = r466222 / r466223;
        double r466225 = 1.0;
        double r466226 = pow(r466224, r466225);
        double r466227 = y;
        double r466228 = z;
        double r466229 = r466222 / r466228;
        double r466230 = log(r466229);
        double r466231 = r466227 * r466230;
        double r466232 = log(r466224);
        double r466233 = t;
        double r466234 = r466232 * r466233;
        double r466235 = b;
        double r466236 = r466234 + r466235;
        double r466237 = r466231 + r466236;
        double r466238 = exp(r466237);
        double r466239 = r466226 / r466238;
        double r466240 = r466221 * r466239;
        double r466241 = r466222 / r466227;
        double r466242 = r466240 * r466241;
        return r466242;
}

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.7
Herbie1.2
\[\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 \frac{x \cdot \color{blue}{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. Simplified1.2

    \[\leadsto \frac{x \cdot \color{blue}{\frac{{\left(\frac{1}{a}\right)}^{1}}{e^{y \cdot \log \left(\frac{1}{z}\right) + \left(\log \left(\frac{1}{a}\right) \cdot t + b\right)}}}}{y}\]
  4. Using strategy rm
  5. Applied div-inv1.2

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

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

Reproduce

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