Average Error: 1.9 → 23.2
Time: 21.5s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\left(\frac{x}{y} \cdot {z}^{y}\right) \cdot \frac{{a}^{\left(t - 1\right)}}{e^{b}}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\left(\frac{x}{y} \cdot {z}^{y}\right) \cdot \frac{{a}^{\left(t - 1\right)}}{e^{b}}
double f(double x, double y, double z, double t, double a, double b) {
        double r443060 = x;
        double r443061 = y;
        double r443062 = z;
        double r443063 = log(r443062);
        double r443064 = r443061 * r443063;
        double r443065 = t;
        double r443066 = 1.0;
        double r443067 = r443065 - r443066;
        double r443068 = a;
        double r443069 = log(r443068);
        double r443070 = r443067 * r443069;
        double r443071 = r443064 + r443070;
        double r443072 = b;
        double r443073 = r443071 - r443072;
        double r443074 = exp(r443073);
        double r443075 = r443060 * r443074;
        double r443076 = r443075 / r443061;
        return r443076;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r443077 = x;
        double r443078 = y;
        double r443079 = r443077 / r443078;
        double r443080 = z;
        double r443081 = pow(r443080, r443078);
        double r443082 = r443079 * r443081;
        double r443083 = a;
        double r443084 = t;
        double r443085 = 1.0;
        double r443086 = r443084 - r443085;
        double r443087 = pow(r443083, r443086);
        double r443088 = b;
        double r443089 = exp(r443088);
        double r443090 = r443087 / r443089;
        double r443091 = r443082 * r443090;
        return r443091;
}

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.9
Herbie23.2
\[\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 64.0

    \[\leadsto \frac{x \cdot e^{\left(\color{blue}{\left(\log -1 - \log \left(\frac{-1}{z}\right)\right) \cdot y} + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
  3. Simplified1.9

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

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

Reproduce

herbie shell --seed 2019304 
(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.88458485041274715) (/ (* x (/ (pow a (- t 1)) y)) (- (+ b 1) (* y (log z)))) (if (< t 852031.22883740731) (/ (* (/ 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))