Average Error: 1.9 → 1.2
Time: 14.1s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\frac{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)}}}{y}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\frac{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)}}}{y}
double f(double x, double y, double z, double t, double a, double b) {
        double r459037 = x;
        double r459038 = y;
        double r459039 = z;
        double r459040 = log(r459039);
        double r459041 = r459038 * r459040;
        double r459042 = t;
        double r459043 = 1.0;
        double r459044 = r459042 - r459043;
        double r459045 = a;
        double r459046 = log(r459045);
        double r459047 = r459044 * r459046;
        double r459048 = r459041 + r459047;
        double r459049 = b;
        double r459050 = r459048 - r459049;
        double r459051 = exp(r459050);
        double r459052 = r459037 * r459051;
        double r459053 = r459052 / r459038;
        return r459053;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r459054 = x;
        double r459055 = 1.0;
        double r459056 = a;
        double r459057 = r459055 / r459056;
        double r459058 = 1.0;
        double r459059 = pow(r459057, r459058);
        double r459060 = y;
        double r459061 = z;
        double r459062 = r459055 / r459061;
        double r459063 = log(r459062);
        double r459064 = r459060 * r459063;
        double r459065 = log(r459057);
        double r459066 = t;
        double r459067 = r459065 * r459066;
        double r459068 = b;
        double r459069 = r459067 + r459068;
        double r459070 = r459064 + r459069;
        double r459071 = exp(r459070);
        double r459072 = r459059 / r459071;
        double r459073 = r459054 * r459072;
        double r459074 = r459073 / r459060;
        return r459074;
}

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.4
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. Final simplification1.2

    \[\leadsto \frac{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)}}}{y}\]

Reproduce

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