Average Error: 2.1 → 0.6
Time: 47.9s
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 -7.350566990880654625576653098125575830144 \cdot 10^{82} \lor \neg \left(x \le 3077508455594739684605952\right):\\ \;\;\;\;\left(x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}\right) \cdot \frac{1}{y}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{x}{y} \cdot e^{\mathsf{fma}\left(\log z, y, \log a \cdot t\right) - b}\right) \cdot {\left(\frac{1}{{a}^{1}}\right)}^{1}\\ \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 -7.350566990880654625576653098125575830144 \cdot 10^{82} \lor \neg \left(x \le 3077508455594739684605952\right):\\
\;\;\;\;\left(x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}\right) \cdot \frac{1}{y}\\

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

\end{array}
double f(double x, double y, double z, double t, double a, double b) {
        double r70759 = x;
        double r70760 = y;
        double r70761 = z;
        double r70762 = log(r70761);
        double r70763 = r70760 * r70762;
        double r70764 = t;
        double r70765 = 1.0;
        double r70766 = r70764 - r70765;
        double r70767 = a;
        double r70768 = log(r70767);
        double r70769 = r70766 * r70768;
        double r70770 = r70763 + r70769;
        double r70771 = b;
        double r70772 = r70770 - r70771;
        double r70773 = exp(r70772);
        double r70774 = r70759 * r70773;
        double r70775 = r70774 / r70760;
        return r70775;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r70776 = x;
        double r70777 = -7.350566990880655e+82;
        bool r70778 = r70776 <= r70777;
        double r70779 = 3.0775084555947397e+24;
        bool r70780 = r70776 <= r70779;
        double r70781 = !r70780;
        bool r70782 = r70778 || r70781;
        double r70783 = y;
        double r70784 = z;
        double r70785 = log(r70784);
        double r70786 = r70783 * r70785;
        double r70787 = t;
        double r70788 = 1.0;
        double r70789 = r70787 - r70788;
        double r70790 = a;
        double r70791 = log(r70790);
        double r70792 = r70789 * r70791;
        double r70793 = r70786 + r70792;
        double r70794 = b;
        double r70795 = r70793 - r70794;
        double r70796 = exp(r70795);
        double r70797 = r70776 * r70796;
        double r70798 = 1.0;
        double r70799 = r70798 / r70783;
        double r70800 = r70797 * r70799;
        double r70801 = r70776 / r70783;
        double r70802 = r70791 * r70787;
        double r70803 = fma(r70785, r70783, r70802);
        double r70804 = r70803 - r70794;
        double r70805 = exp(r70804);
        double r70806 = r70801 * r70805;
        double r70807 = pow(r70790, r70788);
        double r70808 = r70798 / r70807;
        double r70809 = pow(r70808, r70788);
        double r70810 = r70806 * r70809;
        double r70811 = r70782 ? r70800 : r70810;
        return r70811;
}

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

Derivation

  1. Split input into 2 regimes
  2. if x < -7.350566990880655e+82 or 3.0775084555947397e+24 < 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 div-inv0.7

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

    if -7.350566990880655e+82 < x < 3.0775084555947397e+24

    1. Initial program 2.9

      \[\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 div-inv2.9

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

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

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

      \[\leadsto \left(x \cdot e^{\color{blue}{\mathsf{fma}\left(\sqrt{y \cdot \log z + \left(t - 1\right) \cdot \log a}, \sqrt{y \cdot \log z + \left(t - 1\right) \cdot \log a}, -\sqrt[3]{b} \cdot \left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right)\right) + \mathsf{fma}\left(-\sqrt[3]{b}, \sqrt[3]{b} \cdot \sqrt[3]{b}, \sqrt[3]{b} \cdot \left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right)\right)}}\right) \cdot \frac{1}{y}\]
    8. Applied exp-sum54.1

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

      \[\leadsto \left(x \cdot \left(\color{blue}{\left(\frac{{a}^{\left(t - 1\right)}}{e^{b}} \cdot {z}^{y}\right)} \cdot e^{\mathsf{fma}\left(-\sqrt[3]{b}, \sqrt[3]{b} \cdot \sqrt[3]{b}, \sqrt[3]{b} \cdot \left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right)\right)}\right)\right) \cdot \frac{1}{y}\]
    10. Simplified18.4

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

      \[\leadsto \left(x \cdot \left(\left(\frac{\color{blue}{\frac{{a}^{t}}{{a}^{1}}}}{e^{b}} \cdot {z}^{y}\right) \cdot e^{b + \left(-b\right)}\right)\right) \cdot \frac{1}{y}\]
    13. Taylor expanded around inf 16.5

      \[\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}}\]
    14. Simplified0.5

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \le -7.350566990880654625576653098125575830144 \cdot 10^{82} \lor \neg \left(x \le 3077508455594739684605952\right):\\ \;\;\;\;\left(x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}\right) \cdot \frac{1}{y}\\ \mathbf{else}:\\ \;\;\;\;\left(\frac{x}{y} \cdot e^{\mathsf{fma}\left(\log z, y, \log a \cdot t\right) - b}\right) \cdot {\left(\frac{1}{{a}^{1}}\right)}^{1}\\ \end{array}\]

Reproduce

herbie shell --seed 2019325 +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))