Average Error: 1.8 → 1.2
Time: 17.3s
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 r423871 = x;
        double r423872 = y;
        double r423873 = z;
        double r423874 = log(r423873);
        double r423875 = r423872 * r423874;
        double r423876 = t;
        double r423877 = 1.0;
        double r423878 = r423876 - r423877;
        double r423879 = a;
        double r423880 = log(r423879);
        double r423881 = r423878 * r423880;
        double r423882 = r423875 + r423881;
        double r423883 = b;
        double r423884 = r423882 - r423883;
        double r423885 = exp(r423884);
        double r423886 = r423871 * r423885;
        double r423887 = r423886 / r423872;
        return r423887;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r423888 = x;
        double r423889 = 1.0;
        double r423890 = a;
        double r423891 = r423889 / r423890;
        double r423892 = 1.0;
        double r423893 = pow(r423891, r423892);
        double r423894 = y;
        double r423895 = z;
        double r423896 = r423889 / r423895;
        double r423897 = log(r423896);
        double r423898 = r423894 * r423897;
        double r423899 = log(r423891);
        double r423900 = t;
        double r423901 = r423899 * r423900;
        double r423902 = b;
        double r423903 = r423901 + r423902;
        double r423904 = r423898 + r423903;
        double r423905 = exp(r423904);
        double r423906 = r423893 / r423905;
        double r423907 = r423888 * r423906;
        double r423908 = r423889 / r423894;
        double r423909 = r423907 * r423908;
        return r423909;
}

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.8
Target11.6
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.8

    \[\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.1

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