Average Error: 2.0 → 5.8
Time: 41.2s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
\[\begin{array}{l} \mathbf{if}\;y \le -1.218811762387359090359297706344973358133 \cdot 10^{-281} \lor \neg \left(y \le 4.216998801399994992491902428717653999299 \cdot 10^{-137}\right):\\ \;\;\;\;{\left(\frac{1}{{a}^{1}}\right)}^{1} \cdot \sqrt[3]{{\left(\frac{e^{\left(t \cdot \log a - b\right) + \log z \cdot y} \cdot x}{y}\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \frac{\frac{1}{{z}^{y}}}{\frac{\frac{{a}^{t}}{{a}^{1}}}{e^{b}}}}\\ \end{array}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}
\begin{array}{l}
\mathbf{if}\;y \le -1.218811762387359090359297706344973358133 \cdot 10^{-281} \lor \neg \left(y \le 4.216998801399994992491902428717653999299 \cdot 10^{-137}\right):\\
\;\;\;\;{\left(\frac{1}{{a}^{1}}\right)}^{1} \cdot \sqrt[3]{{\left(\frac{e^{\left(t \cdot \log a - b\right) + \log z \cdot y} \cdot x}{y}\right)}^{3}}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \frac{\frac{1}{{z}^{y}}}{\frac{\frac{{a}^{t}}{{a}^{1}}}{e^{b}}}}\\

\end{array}
double f(double x, double y, double z, double t, double a, double b) {
        double r378657 = x;
        double r378658 = y;
        double r378659 = z;
        double r378660 = log(r378659);
        double r378661 = r378658 * r378660;
        double r378662 = t;
        double r378663 = 1.0;
        double r378664 = r378662 - r378663;
        double r378665 = a;
        double r378666 = log(r378665);
        double r378667 = r378664 * r378666;
        double r378668 = r378661 + r378667;
        double r378669 = b;
        double r378670 = r378668 - r378669;
        double r378671 = exp(r378670);
        double r378672 = r378657 * r378671;
        double r378673 = r378672 / r378658;
        return r378673;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r378674 = y;
        double r378675 = -1.2188117623873591e-281;
        bool r378676 = r378674 <= r378675;
        double r378677 = 4.216998801399995e-137;
        bool r378678 = r378674 <= r378677;
        double r378679 = !r378678;
        bool r378680 = r378676 || r378679;
        double r378681 = 1.0;
        double r378682 = a;
        double r378683 = 1.0;
        double r378684 = pow(r378682, r378683);
        double r378685 = r378681 / r378684;
        double r378686 = pow(r378685, r378683);
        double r378687 = t;
        double r378688 = log(r378682);
        double r378689 = r378687 * r378688;
        double r378690 = b;
        double r378691 = r378689 - r378690;
        double r378692 = z;
        double r378693 = log(r378692);
        double r378694 = r378693 * r378674;
        double r378695 = r378691 + r378694;
        double r378696 = exp(r378695);
        double r378697 = x;
        double r378698 = r378696 * r378697;
        double r378699 = r378698 / r378674;
        double r378700 = 3.0;
        double r378701 = pow(r378699, r378700);
        double r378702 = cbrt(r378701);
        double r378703 = r378686 * r378702;
        double r378704 = pow(r378692, r378674);
        double r378705 = r378681 / r378704;
        double r378706 = pow(r378682, r378687);
        double r378707 = r378706 / r378684;
        double r378708 = exp(r378690);
        double r378709 = r378707 / r378708;
        double r378710 = r378705 / r378709;
        double r378711 = r378674 * r378710;
        double r378712 = r378697 / r378711;
        double r378713 = r378680 ? r378703 : r378712;
        return r378713;
}

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

Original2.0
Target11.5
Herbie5.8
\[\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. Split input into 2 regimes
  2. if y < -1.2188117623873591e-281 or 4.216998801399995e-137 < y

    1. Initial program 1.6

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
    2. Using strategy rm
    3. Applied associate-/l*1.4

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

      \[\leadsto \frac{x}{\color{blue}{\frac{y}{{z}^{y} \cdot \frac{{a}^{\left(t - 1\right)}}{e^{b}}}}}\]
    5. Using strategy rm
    6. Applied pow-sub20.3

      \[\leadsto \frac{x}{\frac{y}{{z}^{y} \cdot \frac{\color{blue}{\frac{{a}^{t}}{{a}^{1}}}}{e^{b}}}}\]
    7. Taylor expanded around inf 20.5

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

      \[\leadsto \color{blue}{\left(\frac{x}{y} \cdot e^{\left(-\left(\left(-\log z\right) \cdot y + \left(-\log \left({a}^{t}\right)\right)\right)\right) - b}\right) \cdot {\left(\frac{1}{{a}^{1}}\right)}^{1}}\]
    9. Using strategy rm
    10. Applied add-cbrt-cube11.3

      \[\leadsto \left(\frac{x}{y} \cdot \color{blue}{\sqrt[3]{\left(e^{\left(-\left(\left(-\log z\right) \cdot y + \left(-\log \left({a}^{t}\right)\right)\right)\right) - b} \cdot e^{\left(-\left(\left(-\log z\right) \cdot y + \left(-\log \left({a}^{t}\right)\right)\right)\right) - b}\right) \cdot e^{\left(-\left(\left(-\log z\right) \cdot y + \left(-\log \left({a}^{t}\right)\right)\right)\right) - b}}}\right) \cdot {\left(\frac{1}{{a}^{1}}\right)}^{1}\]
    11. Applied add-cbrt-cube20.4

      \[\leadsto \left(\frac{x}{\color{blue}{\sqrt[3]{\left(y \cdot y\right) \cdot y}}} \cdot \sqrt[3]{\left(e^{\left(-\left(\left(-\log z\right) \cdot y + \left(-\log \left({a}^{t}\right)\right)\right)\right) - b} \cdot e^{\left(-\left(\left(-\log z\right) \cdot y + \left(-\log \left({a}^{t}\right)\right)\right)\right) - b}\right) \cdot e^{\left(-\left(\left(-\log z\right) \cdot y + \left(-\log \left({a}^{t}\right)\right)\right)\right) - b}}\right) \cdot {\left(\frac{1}{{a}^{1}}\right)}^{1}\]
    12. Applied add-cbrt-cube35.5

      \[\leadsto \left(\frac{\color{blue}{\sqrt[3]{\left(x \cdot x\right) \cdot x}}}{\sqrt[3]{\left(y \cdot y\right) \cdot y}} \cdot \sqrt[3]{\left(e^{\left(-\left(\left(-\log z\right) \cdot y + \left(-\log \left({a}^{t}\right)\right)\right)\right) - b} \cdot e^{\left(-\left(\left(-\log z\right) \cdot y + \left(-\log \left({a}^{t}\right)\right)\right)\right) - b}\right) \cdot e^{\left(-\left(\left(-\log z\right) \cdot y + \left(-\log \left({a}^{t}\right)\right)\right)\right) - b}}\right) \cdot {\left(\frac{1}{{a}^{1}}\right)}^{1}\]
    13. Applied cbrt-undiv36.7

      \[\leadsto \left(\color{blue}{\sqrt[3]{\frac{\left(x \cdot x\right) \cdot x}{\left(y \cdot y\right) \cdot y}}} \cdot \sqrt[3]{\left(e^{\left(-\left(\left(-\log z\right) \cdot y + \left(-\log \left({a}^{t}\right)\right)\right)\right) - b} \cdot e^{\left(-\left(\left(-\log z\right) \cdot y + \left(-\log \left({a}^{t}\right)\right)\right)\right) - b}\right) \cdot e^{\left(-\left(\left(-\log z\right) \cdot y + \left(-\log \left({a}^{t}\right)\right)\right)\right) - b}}\right) \cdot {\left(\frac{1}{{a}^{1}}\right)}^{1}\]
    14. Applied cbrt-unprod36.7

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

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

    if -1.2188117623873591e-281 < y < 4.216998801399995e-137

    1. Initial program 4.4

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
    2. Using strategy rm
    3. Applied associate-/l*4.7

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

      \[\leadsto \frac{x}{\color{blue}{\frac{y}{{z}^{y} \cdot \frac{{a}^{\left(t - 1\right)}}{e^{b}}}}}\]
    5. Using strategy rm
    6. Applied pow-sub10.7

      \[\leadsto \frac{x}{\frac{y}{{z}^{y} \cdot \frac{\color{blue}{\frac{{a}^{t}}{{a}^{1}}}}{e^{b}}}}\]
    7. Using strategy rm
    8. Applied div-inv10.7

      \[\leadsto \frac{x}{\color{blue}{y \cdot \frac{1}{{z}^{y} \cdot \frac{\frac{{a}^{t}}{{a}^{1}}}{e^{b}}}}}\]
    9. Simplified10.7

      \[\leadsto \frac{x}{y \cdot \color{blue}{\frac{\frac{1}{{z}^{y}}}{\frac{\frac{{a}^{t}}{{a}^{1}}}{e^{b}}}}}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification5.8

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \le -1.218811762387359090359297706344973358133 \cdot 10^{-281} \lor \neg \left(y \le 4.216998801399994992491902428717653999299 \cdot 10^{-137}\right):\\ \;\;\;\;{\left(\frac{1}{{a}^{1}}\right)}^{1} \cdot \sqrt[3]{{\left(\frac{e^{\left(t \cdot \log a - b\right) + \log z \cdot y} \cdot x}{y}\right)}^{3}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot \frac{\frac{1}{{z}^{y}}}{\frac{\frac{{a}^{t}}{{a}^{1}}}{e^{b}}}}\\ \end{array}\]

Reproduce

herbie shell --seed 2019179 
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"

  :herbie-target
  (if (< t -0.8845848504127471) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1.0))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1.0) (* y (log z))))))

  (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))