Average Error: 1.9 → 0.2
Time: 19.4s
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^{\sqrt[3]{{\left(\mathsf{fma}\left(\log 1 - \left(\mathsf{fma}\left(\frac{1}{2}, \frac{{z}^{2}}{{1}^{2}}, 1 \cdot z\right) + b\right), a, y \cdot \left(\log z - t\right)\right)\right)}^{3}}}\]
x \cdot e^{y \cdot \left(\log z - t\right) + a \cdot \left(\log \left(1 - z\right) - b\right)}
x \cdot e^{\sqrt[3]{{\left(\mathsf{fma}\left(\log 1 - \left(\mathsf{fma}\left(\frac{1}{2}, \frac{{z}^{2}}{{1}^{2}}, 1 \cdot z\right) + b\right), a, y \cdot \left(\log z - t\right)\right)\right)}^{3}}}
double f(double x, double y, double z, double t, double a, double b) {
        double r185421 = x;
        double r185422 = y;
        double r185423 = z;
        double r185424 = log(r185423);
        double r185425 = t;
        double r185426 = r185424 - r185425;
        double r185427 = r185422 * r185426;
        double r185428 = a;
        double r185429 = 1.0;
        double r185430 = r185429 - r185423;
        double r185431 = log(r185430);
        double r185432 = b;
        double r185433 = r185431 - r185432;
        double r185434 = r185428 * r185433;
        double r185435 = r185427 + r185434;
        double r185436 = exp(r185435);
        double r185437 = r185421 * r185436;
        return r185437;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r185438 = x;
        double r185439 = 1.0;
        double r185440 = log(r185439);
        double r185441 = 0.5;
        double r185442 = z;
        double r185443 = 2.0;
        double r185444 = pow(r185442, r185443);
        double r185445 = pow(r185439, r185443);
        double r185446 = r185444 / r185445;
        double r185447 = r185439 * r185442;
        double r185448 = fma(r185441, r185446, r185447);
        double r185449 = b;
        double r185450 = r185448 + r185449;
        double r185451 = r185440 - r185450;
        double r185452 = a;
        double r185453 = y;
        double r185454 = log(r185442);
        double r185455 = t;
        double r185456 = r185454 - r185455;
        double r185457 = r185453 * r185456;
        double r185458 = fma(r185451, r185452, r185457);
        double r185459 = 3.0;
        double r185460 = pow(r185458, r185459);
        double r185461 = cbrt(r185460);
        double r185462 = exp(r185461);
        double r185463 = r185438 * r185462;
        return r185463;
}

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 1.9

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

    \[\leadsto x \cdot e^{y \cdot \left(\log z - t\right) + 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)}\]
  3. Using strategy rm
  4. Applied add-cbrt-cube0.5

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

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

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

Reproduce

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