Average Error: 2.0 → 1.3
Time: 13.6s
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 r489025 = x;
        double r489026 = y;
        double r489027 = z;
        double r489028 = log(r489027);
        double r489029 = r489026 * r489028;
        double r489030 = t;
        double r489031 = 1.0;
        double r489032 = r489030 - r489031;
        double r489033 = a;
        double r489034 = log(r489033);
        double r489035 = r489032 * r489034;
        double r489036 = r489029 + r489035;
        double r489037 = b;
        double r489038 = r489036 - r489037;
        double r489039 = exp(r489038);
        double r489040 = r489025 * r489039;
        double r489041 = r489040 / r489026;
        return r489041;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r489042 = x;
        double r489043 = 1.0;
        double r489044 = a;
        double r489045 = r489043 / r489044;
        double r489046 = 1.0;
        double r489047 = pow(r489045, r489046);
        double r489048 = y;
        double r489049 = z;
        double r489050 = r489043 / r489049;
        double r489051 = log(r489050);
        double r489052 = r489048 * r489051;
        double r489053 = log(r489045);
        double r489054 = t;
        double r489055 = r489053 * r489054;
        double r489056 = b;
        double r489057 = r489055 + r489056;
        double r489058 = r489052 + r489057;
        double r489059 = exp(r489058);
        double r489060 = r489047 / r489059;
        double r489061 = r489042 * r489060;
        double r489062 = r489043 / r489048;
        double r489063 = r489061 * r489062;
        return r489063;
}

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.3
Herbie1.3
\[\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 2.0

    \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
  2. Taylor expanded around inf 2.0

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

    \[\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 2020036 
(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))