Average Error: 1.9 → 23.2
Time: 37.3s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\frac{{\left(\frac{1}{a}\right)}^{1}}{{\left(\frac{1}{z}\right)}^{y}} \cdot \frac{\frac{x}{y}}{\frac{e^{b}}{{a}^{t}}}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\frac{{\left(\frac{1}{a}\right)}^{1}}{{\left(\frac{1}{z}\right)}^{y}} \cdot \frac{\frac{x}{y}}{\frac{e^{b}}{{a}^{t}}}
double f(double x, double y, double z, double t, double a, double b) {
        double r362104 = x;
        double r362105 = y;
        double r362106 = z;
        double r362107 = log(r362106);
        double r362108 = r362105 * r362107;
        double r362109 = t;
        double r362110 = 1.0;
        double r362111 = r362109 - r362110;
        double r362112 = a;
        double r362113 = log(r362112);
        double r362114 = r362111 * r362113;
        double r362115 = r362108 + r362114;
        double r362116 = b;
        double r362117 = r362115 - r362116;
        double r362118 = exp(r362117);
        double r362119 = r362104 * r362118;
        double r362120 = r362119 / r362105;
        return r362120;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r362121 = 1.0;
        double r362122 = a;
        double r362123 = r362121 / r362122;
        double r362124 = 1.0;
        double r362125 = pow(r362123, r362124);
        double r362126 = z;
        double r362127 = r362121 / r362126;
        double r362128 = y;
        double r362129 = pow(r362127, r362128);
        double r362130 = r362125 / r362129;
        double r362131 = x;
        double r362132 = r362131 / r362128;
        double r362133 = b;
        double r362134 = exp(r362133);
        double r362135 = t;
        double r362136 = pow(r362122, r362135);
        double r362137 = r362134 / r362136;
        double r362138 = r362132 / r362137;
        double r362139 = r362130 * r362138;
        return r362139;
}

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.3
Herbie23.2
\[\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 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.3

    \[\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 simplification23.2

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

Reproduce

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