Average Error: 1.9 → 2.1
Time: 21.4s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\frac{e^{\left(-\log a\right) \cdot \left(1 - t\right) - \left(b - y \cdot \log z\right)}}{y} \cdot x\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\frac{e^{\left(-\log a\right) \cdot \left(1 - t\right) - \left(b - y \cdot \log z\right)}}{y} \cdot x
double f(double x, double y, double z, double t, double a, double b) {
        double r517031 = x;
        double r517032 = y;
        double r517033 = z;
        double r517034 = log(r517033);
        double r517035 = r517032 * r517034;
        double r517036 = t;
        double r517037 = 1.0;
        double r517038 = r517036 - r517037;
        double r517039 = a;
        double r517040 = log(r517039);
        double r517041 = r517038 * r517040;
        double r517042 = r517035 + r517041;
        double r517043 = b;
        double r517044 = r517042 - r517043;
        double r517045 = exp(r517044);
        double r517046 = r517031 * r517045;
        double r517047 = r517046 / r517032;
        return r517047;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r517048 = a;
        double r517049 = log(r517048);
        double r517050 = -r517049;
        double r517051 = 1.0;
        double r517052 = t;
        double r517053 = r517051 - r517052;
        double r517054 = r517050 * r517053;
        double r517055 = b;
        double r517056 = y;
        double r517057 = z;
        double r517058 = log(r517057);
        double r517059 = r517056 * r517058;
        double r517060 = r517055 - r517059;
        double r517061 = r517054 - r517060;
        double r517062 = exp(r517061);
        double r517063 = r517062 / r517056;
        double r517064 = x;
        double r517065 = r517063 * r517064;
        return r517065;
}

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.1
Herbie2.1
\[\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 \color{blue}{\frac{x \cdot 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. Simplified2.1

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

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

Reproduce

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