Average Error: 2.0 → 1.2
Time: 51.8s
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}\;x \le -1.867916604805872889254335239799145077959 \cdot 10^{140}:\\ \;\;\;\;\frac{x \cdot \left(\left(\sqrt[3]{e^{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b}} \cdot \sqrt[3]{{\left(e^{\sqrt[3]{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b} \cdot \sqrt[3]{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b}}\right)}^{\left(\sqrt[3]{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b}\right)}}\right) \cdot \sqrt[3]{e^{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b}}\right)}{y}\\ \mathbf{elif}\;x \le 1.45122823435616693194835113613443103252 \cdot 10^{101}:\\ \;\;\;\;\frac{x}{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \frac{e^{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b}}{\sqrt[3]{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{e}^{\left(\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b\right)} \cdot x}{y}\\ \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}\;x \le -1.867916604805872889254335239799145077959 \cdot 10^{140}:\\
\;\;\;\;\frac{x \cdot \left(\left(\sqrt[3]{e^{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b}} \cdot \sqrt[3]{{\left(e^{\sqrt[3]{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b} \cdot \sqrt[3]{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b}}\right)}^{\left(\sqrt[3]{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b}\right)}}\right) \cdot \sqrt[3]{e^{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b}}\right)}{y}\\

\mathbf{elif}\;x \le 1.45122823435616693194835113613443103252 \cdot 10^{101}:\\
\;\;\;\;\frac{x}{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \frac{e^{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b}}{\sqrt[3]{y}}\\

\mathbf{else}:\\
\;\;\;\;\frac{{e}^{\left(\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b\right)} \cdot x}{y}\\

\end{array}
double f(double x, double y, double z, double t, double a, double b) {
        double r26517685 = x;
        double r26517686 = y;
        double r26517687 = z;
        double r26517688 = log(r26517687);
        double r26517689 = r26517686 * r26517688;
        double r26517690 = t;
        double r26517691 = 1.0;
        double r26517692 = r26517690 - r26517691;
        double r26517693 = a;
        double r26517694 = log(r26517693);
        double r26517695 = r26517692 * r26517694;
        double r26517696 = r26517689 + r26517695;
        double r26517697 = b;
        double r26517698 = r26517696 - r26517697;
        double r26517699 = exp(r26517698);
        double r26517700 = r26517685 * r26517699;
        double r26517701 = r26517700 / r26517686;
        return r26517701;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r26517702 = x;
        double r26517703 = -1.8679166048058729e+140;
        bool r26517704 = r26517702 <= r26517703;
        double r26517705 = a;
        double r26517706 = log(r26517705);
        double r26517707 = t;
        double r26517708 = 1.0;
        double r26517709 = r26517707 - r26517708;
        double r26517710 = r26517706 * r26517709;
        double r26517711 = y;
        double r26517712 = z;
        double r26517713 = log(r26517712);
        double r26517714 = r26517711 * r26517713;
        double r26517715 = r26517710 + r26517714;
        double r26517716 = b;
        double r26517717 = r26517715 - r26517716;
        double r26517718 = exp(r26517717);
        double r26517719 = cbrt(r26517718);
        double r26517720 = cbrt(r26517717);
        double r26517721 = r26517720 * r26517720;
        double r26517722 = exp(r26517721);
        double r26517723 = pow(r26517722, r26517720);
        double r26517724 = cbrt(r26517723);
        double r26517725 = r26517719 * r26517724;
        double r26517726 = r26517725 * r26517719;
        double r26517727 = r26517702 * r26517726;
        double r26517728 = r26517727 / r26517711;
        double r26517729 = 1.451228234356167e+101;
        bool r26517730 = r26517702 <= r26517729;
        double r26517731 = cbrt(r26517711);
        double r26517732 = r26517731 * r26517731;
        double r26517733 = r26517702 / r26517732;
        double r26517734 = r26517718 / r26517731;
        double r26517735 = r26517733 * r26517734;
        double r26517736 = exp(1.0);
        double r26517737 = pow(r26517736, r26517717);
        double r26517738 = r26517737 * r26517702;
        double r26517739 = r26517738 / r26517711;
        double r26517740 = r26517730 ? r26517735 : r26517739;
        double r26517741 = r26517704 ? r26517728 : r26517740;
        return r26517741;
}

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
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. Split input into 3 regimes
  2. if x < -1.8679166048058729e+140

    1. Initial program 0.8

      \[\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 add-cube-cbrt0.8

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

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

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

    if -1.8679166048058729e+140 < x < 1.451228234356167e+101

    1. Initial program 2.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 add-cube-cbrt2.4

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

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

    if 1.451228234356167e+101 < x

    1. Initial program 0.7

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

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

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

      \[\leadsto \frac{x \cdot {\color{blue}{e}}^{\left(\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b\right)}}{y}\]
  3. Recombined 3 regimes into one program.
  4. Final simplification1.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -1.867916604805872889254335239799145077959 \cdot 10^{140}:\\ \;\;\;\;\frac{x \cdot \left(\left(\sqrt[3]{e^{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b}} \cdot \sqrt[3]{{\left(e^{\sqrt[3]{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b} \cdot \sqrt[3]{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b}}\right)}^{\left(\sqrt[3]{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b}\right)}}\right) \cdot \sqrt[3]{e^{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b}}\right)}{y}\\ \mathbf{elif}\;x \le 1.45122823435616693194835113613443103252 \cdot 10^{101}:\\ \;\;\;\;\frac{x}{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \frac{e^{\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b}}{\sqrt[3]{y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{{e}^{\left(\left(\log a \cdot \left(t - 1\right) + y \cdot \log z\right) - b\right)} \cdot x}{y}\\ \end{array}\]

Reproduce

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