Average Error: 1.9 → 1.1
Time: 14.7s
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 r416913 = x;
        double r416914 = y;
        double r416915 = z;
        double r416916 = log(r416915);
        double r416917 = r416914 * r416916;
        double r416918 = t;
        double r416919 = 1.0;
        double r416920 = r416918 - r416919;
        double r416921 = a;
        double r416922 = log(r416921);
        double r416923 = r416920 * r416922;
        double r416924 = r416917 + r416923;
        double r416925 = b;
        double r416926 = r416924 - r416925;
        double r416927 = exp(r416926);
        double r416928 = r416913 * r416927;
        double r416929 = r416928 / r416914;
        return r416929;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r416930 = x;
        double r416931 = 1.0;
        double r416932 = a;
        double r416933 = r416931 / r416932;
        double r416934 = 1.0;
        double r416935 = pow(r416933, r416934);
        double r416936 = y;
        double r416937 = z;
        double r416938 = r416931 / r416937;
        double r416939 = log(r416938);
        double r416940 = r416936 * r416939;
        double r416941 = log(r416933);
        double r416942 = t;
        double r416943 = r416941 * r416942;
        double r416944 = b;
        double r416945 = r416943 + r416944;
        double r416946 = r416940 + r416945;
        double r416947 = exp(r416946);
        double r416948 = r416935 / r416947;
        double r416949 = r416930 * r416948;
        double r416950 = r416949 / r416936;
        return r416950;
}

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
Target10.4
Herbie1.1
\[\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.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. Final simplification1.1

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