Average Error: 0.9 → 0.5
Time: 13.2s
Precision: 64
\[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\]
\[x \cdot e^{\mathsf{fma}\left(y, \log z - t, \mathsf{fma}\left(\sqrt[3]{\log \left(1 - z\right)} \cdot \sqrt[3]{\log \left(1 - z\right)}, \sqrt[3]{\log \left(1 - z\right)}, -b \cdot 1\right) \cdot a\right) + a \cdot \mathsf{fma}\left(-b, 1, b \cdot 1\right)}\]
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
x \cdot e^{\mathsf{fma}\left(y, \log z - t, \mathsf{fma}\left(\sqrt[3]{\log \left(1 - z\right)} \cdot \sqrt[3]{\log \left(1 - z\right)}, \sqrt[3]{\log \left(1 - z\right)}, -b \cdot 1\right) \cdot a\right) + a \cdot \mathsf{fma}\left(-b, 1, b \cdot 1\right)}
double f(double x, double y, double z, double t, double a, double b) {
        double r117419 = x;
        double r117420 = y;
        double r117421 = z;
        double r117422 = log(r117421);
        double r117423 = t;
        double r117424 = r117422 - r117423;
        double r117425 = r117420 * r117424;
        double r117426 = a;
        double r117427 = 1.0;
        double r117428 = r117427 - r117421;
        double r117429 = log(r117428);
        double r117430 = b;
        double r117431 = r117429 - r117430;
        double r117432 = r117426 * r117431;
        double r117433 = r117425 + r117432;
        double r117434 = exp(r117433);
        double r117435 = r117419 * r117434;
        return r117435;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r117436 = x;
        double r117437 = y;
        double r117438 = z;
        double r117439 = log(r117438);
        double r117440 = t;
        double r117441 = r117439 - r117440;
        double r117442 = 1.0;
        double r117443 = r117442 - r117438;
        double r117444 = log(r117443);
        double r117445 = cbrt(r117444);
        double r117446 = r117445 * r117445;
        double r117447 = b;
        double r117448 = 1.0;
        double r117449 = r117447 * r117448;
        double r117450 = -r117449;
        double r117451 = fma(r117446, r117445, r117450);
        double r117452 = a;
        double r117453 = r117451 * r117452;
        double r117454 = fma(r117437, r117441, r117453);
        double r117455 = -r117447;
        double r117456 = fma(r117455, r117448, r117449);
        double r117457 = r117452 * r117456;
        double r117458 = r117454 + r117457;
        double r117459 = exp(r117458);
        double r117460 = r117436 * r117459;
        return r117460;
}

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. Initial program 0.9

    \[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\]
  2. Using strategy rm
  3. Applied *-un-lft-identity0.9

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

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

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

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

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

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

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

Reproduce

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