Average Error: 2.0 → 0.3
Time: 38.0s
Precision: 64
\[x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}\]
\[{\left({\left(e^{\sqrt[3]{\mathsf{fma}\left(\log z - t, y, a \cdot \left(\log 1 - \mathsf{fma}\left(\frac{1}{2}, \frac{{z}^{2}}{{1}^{2}}, \mathsf{fma}\left(1, z, b\right)\right)\right)\right)}}\right)}^{\left(\sqrt[3]{\mathsf{fma}\left(\log z - t, y, a \cdot \left(\log 1 - \mathsf{fma}\left(\frac{1}{2}, \frac{{z}^{2}}{{1}^{2}}, \mathsf{fma}\left(1, z, b\right)\right)\right)\right)}\right)}\right)}^{\left(\sqrt[3]{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - \mathsf{fma}\left(\frac{1}{2}, \frac{{z}^{2}}{{1}^{2}}, 1 \cdot z\right)\right) - b\right)\right)}\right)} \cdot x\]
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
{\left({\left(e^{\sqrt[3]{\mathsf{fma}\left(\log z - t, y, a \cdot \left(\log 1 - \mathsf{fma}\left(\frac{1}{2}, \frac{{z}^{2}}{{1}^{2}}, \mathsf{fma}\left(1, z, b\right)\right)\right)\right)}}\right)}^{\left(\sqrt[3]{\mathsf{fma}\left(\log z - t, y, a \cdot \left(\log 1 - \mathsf{fma}\left(\frac{1}{2}, \frac{{z}^{2}}{{1}^{2}}, \mathsf{fma}\left(1, z, b\right)\right)\right)\right)}\right)}\right)}^{\left(\sqrt[3]{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\left(\log 1 - \mathsf{fma}\left(\frac{1}{2}, \frac{{z}^{2}}{{1}^{2}}, 1 \cdot z\right)\right) - b\right)\right)}\right)} \cdot x
double f(double x, double y, double z, double t, double a, double b) {
        double r131466 = x;
        double r131467 = y;
        double r131468 = z;
        double r131469 = log(r131468);
        double r131470 = t;
        double r131471 = r131469 - r131470;
        double r131472 = r131467 * r131471;
        double r131473 = a;
        double r131474 = 1.0;
        double r131475 = r131474 - r131468;
        double r131476 = log(r131475);
        double r131477 = b;
        double r131478 = r131476 - r131477;
        double r131479 = r131473 * r131478;
        double r131480 = r131472 + r131479;
        double r131481 = exp(r131480);
        double r131482 = r131466 * r131481;
        return r131482;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r131483 = z;
        double r131484 = log(r131483);
        double r131485 = t;
        double r131486 = r131484 - r131485;
        double r131487 = y;
        double r131488 = a;
        double r131489 = 1.0;
        double r131490 = log(r131489);
        double r131491 = 0.5;
        double r131492 = 2.0;
        double r131493 = pow(r131483, r131492);
        double r131494 = pow(r131489, r131492);
        double r131495 = r131493 / r131494;
        double r131496 = b;
        double r131497 = fma(r131489, r131483, r131496);
        double r131498 = fma(r131491, r131495, r131497);
        double r131499 = r131490 - r131498;
        double r131500 = r131488 * r131499;
        double r131501 = fma(r131486, r131487, r131500);
        double r131502 = cbrt(r131501);
        double r131503 = exp(r131502);
        double r131504 = pow(r131503, r131502);
        double r131505 = r131489 * r131483;
        double r131506 = fma(r131491, r131495, r131505);
        double r131507 = r131490 - r131506;
        double r131508 = r131507 - r131496;
        double r131509 = r131488 * r131508;
        double r131510 = fma(r131487, r131486, r131509);
        double r131511 = cbrt(r131510);
        double r131512 = pow(r131504, r131511);
        double r131513 = x;
        double r131514 = r131512 * r131513;
        return r131514;
}

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 2.0

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

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

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

    \[\leadsto e^{\mathsf{fma}\left(y, \log z - t, a \cdot \left(\color{blue}{\left(\log 1 - \mathsf{fma}\left(\frac{1}{2}, \frac{{z}^{2}}{{1}^{2}}, 1 \cdot z\right)\right)} - b\right)\right)} \cdot x\]
  5. Using strategy rm
  6. Applied add-cube-cbrt0.3

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

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

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

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

Reproduce

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