Average Error: 1.8 → 1.1
Time: 15.6s
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}}{1 \cdot 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}}{1 \cdot 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 r432608 = x;
        double r432609 = y;
        double r432610 = z;
        double r432611 = log(r432610);
        double r432612 = r432609 * r432611;
        double r432613 = t;
        double r432614 = 1.0;
        double r432615 = r432613 - r432614;
        double r432616 = a;
        double r432617 = log(r432616);
        double r432618 = r432615 * r432617;
        double r432619 = r432612 + r432618;
        double r432620 = b;
        double r432621 = r432619 - r432620;
        double r432622 = exp(r432621);
        double r432623 = r432608 * r432622;
        double r432624 = r432623 / r432609;
        return r432624;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r432625 = x;
        double r432626 = 1.0;
        double r432627 = a;
        double r432628 = r432626 / r432627;
        double r432629 = 1.0;
        double r432630 = pow(r432628, r432629);
        double r432631 = y;
        double r432632 = z;
        double r432633 = r432626 / r432632;
        double r432634 = log(r432633);
        double r432635 = r432631 * r432634;
        double r432636 = log(r432628);
        double r432637 = t;
        double r432638 = r432636 * r432637;
        double r432639 = b;
        double r432640 = r432638 + r432639;
        double r432641 = r432635 + r432640;
        double r432642 = exp(r432641);
        double r432643 = r432626 * r432642;
        double r432644 = r432630 / r432643;
        double r432645 = r432625 * r432644;
        double r432646 = r432645 / r432631;
        return r432646;
}

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
Target10.9
Herbie1.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.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.8

    \[\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 *-un-lft-identity1.1

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

    \[\leadsto \frac{x \cdot \frac{{\left(\frac{1}{a}\right)}^{1}}{1 \cdot 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 2020034 
(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))