Average Error: 1.9 → 1.2
Time: 15.2s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\frac{\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)}} \cdot x}{y}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\frac{\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)}} \cdot x}{y}
double f(double x, double y, double z, double t, double a, double b) {
        double r464638 = x;
        double r464639 = y;
        double r464640 = z;
        double r464641 = log(r464640);
        double r464642 = r464639 * r464641;
        double r464643 = t;
        double r464644 = 1.0;
        double r464645 = r464643 - r464644;
        double r464646 = a;
        double r464647 = log(r464646);
        double r464648 = r464645 * r464647;
        double r464649 = r464642 + r464648;
        double r464650 = b;
        double r464651 = r464649 - r464650;
        double r464652 = exp(r464651);
        double r464653 = r464638 * r464652;
        double r464654 = r464653 / r464639;
        return r464654;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r464655 = 1.0;
        double r464656 = a;
        double r464657 = r464655 / r464656;
        double r464658 = 1.0;
        double r464659 = pow(r464657, r464658);
        double r464660 = y;
        double r464661 = z;
        double r464662 = r464655 / r464661;
        double r464663 = log(r464662);
        double r464664 = r464660 * r464663;
        double r464665 = log(r464657);
        double r464666 = t;
        double r464667 = r464665 * r464666;
        double r464668 = b;
        double r464669 = r464667 + r464668;
        double r464670 = r464664 + r464669;
        double r464671 = exp(r464670);
        double r464672 = r464659 / r464671;
        double r464673 = x;
        double r464674 = r464672 * r464673;
        double r464675 = r464674 / r464660;
        return r464675;
}

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
Target11.4
Herbie1.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 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 *-commutative1.2

    \[\leadsto \frac{\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)}} \cdot x}}{y}\]
  6. Final simplification1.2

    \[\leadsto \frac{\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)}} \cdot x}{y}\]

Reproduce

herbie shell --seed 2019356 
(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))