Average Error: 2.1 → 4.4
Time: 18.4s
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.3720154821277287 \cdot 10^{-66} \lor \neg \left(y \le 2.1260560135388765 \cdot 10^{-43}\right):\\ \;\;\;\;{\left(\frac{1}{{a}^{1}}\right)}^{1} \cdot \left(e^{\left(y \cdot \log z - t \cdot \left(-\log a\right)\right) - b} \cdot \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{{a}^{t}}{{a}^{1}} \cdot {z}^{y}}{y \cdot 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.3720154821277287 \cdot 10^{-66} \lor \neg \left(y \le 2.1260560135388765 \cdot 10^{-43}\right):\\
\;\;\;\;{\left(\frac{1}{{a}^{1}}\right)}^{1} \cdot \left(e^{\left(y \cdot \log z - t \cdot \left(-\log a\right)\right) - b} \cdot \frac{x}{y}\right)\\

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

\end{array}
double f(double x, double y, double z, double t, double a, double b) {
        double r90692 = x;
        double r90693 = y;
        double r90694 = z;
        double r90695 = log(r90694);
        double r90696 = r90693 * r90695;
        double r90697 = t;
        double r90698 = 1.0;
        double r90699 = r90697 - r90698;
        double r90700 = a;
        double r90701 = log(r90700);
        double r90702 = r90699 * r90701;
        double r90703 = r90696 + r90702;
        double r90704 = b;
        double r90705 = r90703 - r90704;
        double r90706 = exp(r90705);
        double r90707 = r90692 * r90706;
        double r90708 = r90707 / r90693;
        return r90708;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r90709 = y;
        double r90710 = -1.3720154821277287e-66;
        bool r90711 = r90709 <= r90710;
        double r90712 = 2.1260560135388765e-43;
        bool r90713 = r90709 <= r90712;
        double r90714 = !r90713;
        bool r90715 = r90711 || r90714;
        double r90716 = 1.0;
        double r90717 = a;
        double r90718 = 1.0;
        double r90719 = pow(r90717, r90718);
        double r90720 = r90716 / r90719;
        double r90721 = pow(r90720, r90718);
        double r90722 = z;
        double r90723 = log(r90722);
        double r90724 = r90709 * r90723;
        double r90725 = t;
        double r90726 = log(r90717);
        double r90727 = -r90726;
        double r90728 = r90725 * r90727;
        double r90729 = r90724 - r90728;
        double r90730 = b;
        double r90731 = r90729 - r90730;
        double r90732 = exp(r90731);
        double r90733 = x;
        double r90734 = r90733 / r90709;
        double r90735 = r90732 * r90734;
        double r90736 = r90721 * r90735;
        double r90737 = pow(r90717, r90725);
        double r90738 = r90737 / r90719;
        double r90739 = pow(r90722, r90709);
        double r90740 = r90738 * r90739;
        double r90741 = exp(r90730);
        double r90742 = r90709 * r90741;
        double r90743 = r90740 / r90742;
        double r90744 = r90733 * r90743;
        double r90745 = r90715 ? r90736 : r90744;
        return r90745;
}

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

Derivation

  1. Split input into 2 regimes
  2. if y < -1.3720154821277287e-66 or 2.1260560135388765e-43 < y

    1. Initial program 0.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-log-exp8.9

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

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

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

      \[\leadsto \frac{x \cdot \color{blue}{\frac{e^{y \cdot \log z + \left(t - 1\right) \cdot \log a}}{e^{b}}}}{y}\]
    7. Using strategy rm
    8. Applied *-un-lft-identity14.9

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

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

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

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

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

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

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

    if -1.3720154821277287e-66 < y < 2.1260560135388765e-43

    1. Initial program 4.3

      \[\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-log-exp7.9

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

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

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

      \[\leadsto \frac{x \cdot \color{blue}{\frac{e^{y \cdot \log z + \left(t - 1\right) \cdot \log a}}{e^{b}}}}{y}\]
    7. Using strategy rm
    8. Applied *-un-lft-identity11.5

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

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

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

      \[\leadsto x \cdot \color{blue}{\frac{{a}^{\left(t - 1\right)} \cdot {z}^{y}}{y \cdot e^{b}}}\]
    12. Using strategy rm
    13. Applied pow-sub9.8

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \le -1.3720154821277287 \cdot 10^{-66} \lor \neg \left(y \le 2.1260560135388765 \cdot 10^{-43}\right):\\ \;\;\;\;{\left(\frac{1}{{a}^{1}}\right)}^{1} \cdot \left(e^{\left(y \cdot \log z - t \cdot \left(-\log a\right)\right) - b} \cdot \frac{x}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{\frac{{a}^{t}}{{a}^{1}} \cdot {z}^{y}}{y \cdot e^{b}}\\ \end{array}\]

Reproduce

herbie shell --seed 2020043 +o rules:numerics
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2"
  :precision binary64
  (/ (* x (exp (- (+ (* y (log z)) (* (- t 1) (log a))) b))) y))