Average Error: 1.9 → 0.4
Time: 13.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}\;x \le -5.2777310543672989 \cdot 10^{-33} \lor \neg \left(x \le 4.9366026309761553 \cdot 10^{-158}\right):\\ \;\;\;\;x \cdot \left(\frac{{\left(\frac{1}{a}\right)}^{1}}{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}} \cdot \frac{1}{y}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{{\left(\frac{1}{a}\right)}^{1}}{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}{\frac{y}{x}}\\ \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 -5.2777310543672989 \cdot 10^{-33} \lor \neg \left(x \le 4.9366026309761553 \cdot 10^{-158}\right):\\
\;\;\;\;x \cdot \left(\frac{{\left(\frac{1}{a}\right)}^{1}}{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}} \cdot \frac{1}{y}\right)\\

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

\end{array}
double f(double x, double y, double z, double t, double a, double b) {
        double r96441 = x;
        double r96442 = y;
        double r96443 = z;
        double r96444 = log(r96443);
        double r96445 = r96442 * r96444;
        double r96446 = t;
        double r96447 = 1.0;
        double r96448 = r96446 - r96447;
        double r96449 = a;
        double r96450 = log(r96449);
        double r96451 = r96448 * r96450;
        double r96452 = r96445 + r96451;
        double r96453 = b;
        double r96454 = r96452 - r96453;
        double r96455 = exp(r96454);
        double r96456 = r96441 * r96455;
        double r96457 = r96456 / r96442;
        return r96457;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r96458 = x;
        double r96459 = -5.277731054367299e-33;
        bool r96460 = r96458 <= r96459;
        double r96461 = 4.936602630976155e-158;
        bool r96462 = r96458 <= r96461;
        double r96463 = !r96462;
        bool r96464 = r96460 || r96463;
        double r96465 = 1.0;
        double r96466 = a;
        double r96467 = r96465 / r96466;
        double r96468 = 1.0;
        double r96469 = pow(r96467, r96468);
        double r96470 = y;
        double r96471 = z;
        double r96472 = r96465 / r96471;
        double r96473 = log(r96472);
        double r96474 = log(r96467);
        double r96475 = t;
        double r96476 = b;
        double r96477 = fma(r96474, r96475, r96476);
        double r96478 = fma(r96470, r96473, r96477);
        double r96479 = exp(r96478);
        double r96480 = r96469 / r96479;
        double r96481 = r96465 / r96470;
        double r96482 = r96480 * r96481;
        double r96483 = r96458 * r96482;
        double r96484 = r96470 / r96458;
        double r96485 = r96480 / r96484;
        double r96486 = r96464 ? r96483 : r96485;
        return r96486;
}

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 < -5.277731054367299e-33 or 4.936602630976155e-158 < x

    1. Initial program 1.1

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
    2. Taylor expanded around inf 1.1

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

      \[\leadsto \frac{x \cdot \color{blue}{\frac{{\left(\frac{1}{a}\right)}^{1}}{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}}}{y}\]
    4. Using strategy rm
    5. Applied div-inv0.4

      \[\leadsto \color{blue}{\left(x \cdot \frac{{\left(\frac{1}{a}\right)}^{1}}{e^{\mathsf{fma}\left(y, \log \left(\frac{1}{z}\right), \mathsf{fma}\left(\log \left(\frac{1}{a}\right), t, b\right)\right)}}\right) \cdot \frac{1}{y}}\]
    6. Using strategy rm
    7. Applied associate-*l*0.5

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

    if -5.277731054367299e-33 < x < 4.936602630976155e-158

    1. Initial program 3.2

      \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1\right) \cdot \log a\right) - b}}{y}\]
    2. Taylor expanded around inf 3.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}}\]
    3. Simplified0.1

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

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

Reproduce

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