Average Error: 1.7 → 0.7
Time: 19.3s
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}\;\log a \le -211.7074222693128717764921020716428756714:\\ \;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(y \cdot {a}^{1}\right) \cdot e^{b - \mathsf{fma}\left(\log z, y, \log a \cdot t\right)}}\\ \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}\;\log a \le -211.7074222693128717764921020716428756714:\\
\;\;\;\;\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\\

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

\end{array}
double f(double x, double y, double z, double t, double a, double b) {
        double r93084 = x;
        double r93085 = y;
        double r93086 = z;
        double r93087 = log(r93086);
        double r93088 = r93085 * r93087;
        double r93089 = t;
        double r93090 = 1.0;
        double r93091 = r93089 - r93090;
        double r93092 = a;
        double r93093 = log(r93092);
        double r93094 = r93091 * r93093;
        double r93095 = r93088 + r93094;
        double r93096 = b;
        double r93097 = r93095 - r93096;
        double r93098 = exp(r93097);
        double r93099 = r93084 * r93098;
        double r93100 = r93099 / r93085;
        return r93100;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r93101 = a;
        double r93102 = log(r93101);
        double r93103 = -211.70742226931287;
        bool r93104 = r93102 <= r93103;
        double r93105 = x;
        double r93106 = y;
        double r93107 = z;
        double r93108 = log(r93107);
        double r93109 = r93106 * r93108;
        double r93110 = t;
        double r93111 = 1.0;
        double r93112 = r93110 - r93111;
        double r93113 = r93112 * r93102;
        double r93114 = r93109 + r93113;
        double r93115 = b;
        double r93116 = r93114 - r93115;
        double r93117 = exp(r93116);
        double r93118 = r93105 * r93117;
        double r93119 = r93118 / r93106;
        double r93120 = pow(r93101, r93111);
        double r93121 = r93106 * r93120;
        double r93122 = r93102 * r93110;
        double r93123 = fma(r93108, r93106, r93122);
        double r93124 = r93115 - r93123;
        double r93125 = exp(r93124);
        double r93126 = r93121 * r93125;
        double r93127 = r93105 / r93126;
        double r93128 = r93104 ? r93119 : r93127;
        return r93128;
}

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 (log a) < -211.70742226931287

    1. Initial program 0.7

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

    if -211.70742226931287 < (log a)

    1. Initial program 2.2

      \[\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.2

      \[\leadsto \frac{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}}}}{y}\]
    4. Applied add-cube-cbrt2.6

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

      \[\leadsto \frac{x \cdot e^{\color{blue}{\mathsf{fma}\left(\sqrt[3]{y \cdot \log z + \left(t - 1\right) \cdot \log a} \cdot \sqrt[3]{y \cdot \log z + \left(t - 1\right) \cdot \log a}, \sqrt[3]{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)}}}{y}\]
    6. Applied exp-sum16.0

      \[\leadsto \frac{x \cdot \color{blue}{\left(e^{\mathsf{fma}\left(\sqrt[3]{y \cdot \log z + \left(t - 1\right) \cdot \log a} \cdot \sqrt[3]{y \cdot \log z + \left(t - 1\right) \cdot \log a}, \sqrt[3]{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)}}{y}\]
    7. Simplified16.0

      \[\leadsto \frac{x \cdot \left(\color{blue}{e^{{\left(\sqrt[3]{\mathsf{fma}\left(y, \log z, \left(t - 1\right) \cdot \log a\right)}\right)}^{3} - b}} \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)}{y}\]
    8. Simplified2.6

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

      \[\leadsto \color{blue}{\frac{x \cdot 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}}\]
    10. Simplified0.8

      \[\leadsto \color{blue}{\frac{x}{\left(y \cdot {a}^{1}\right) \cdot e^{\mathsf{fma}\left(y, -\log z, \mathsf{fma}\left(-\log a, t, b\right)\right)}}}\]
    11. Taylor expanded around 0 0.8

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

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

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

Reproduce

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