Average Error: 2.1 → 0.3
Time: 21.7s
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 r194675 = x;
        double r194676 = y;
        double r194677 = z;
        double r194678 = log(r194677);
        double r194679 = t;
        double r194680 = r194678 - r194679;
        double r194681 = r194676 * r194680;
        double r194682 = a;
        double r194683 = 1.0;
        double r194684 = r194683 - r194677;
        double r194685 = log(r194684);
        double r194686 = b;
        double r194687 = r194685 - r194686;
        double r194688 = r194682 * r194687;
        double r194689 = r194681 + r194688;
        double r194690 = exp(r194689);
        double r194691 = r194675 * r194690;
        return r194691;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r194692 = x;
        double r194693 = 1.0;
        double r194694 = log(r194693);
        double r194695 = 0.5;
        double r194696 = z;
        double r194697 = 2.0;
        double r194698 = pow(r194696, r194697);
        double r194699 = pow(r194693, r194697);
        double r194700 = r194698 / r194699;
        double r194701 = r194693 * r194696;
        double r194702 = fma(r194695, r194700, r194701);
        double r194703 = b;
        double r194704 = r194702 + r194703;
        double r194705 = r194694 - r194704;
        double r194706 = a;
        double r194707 = y;
        double r194708 = log(r194696);
        double r194709 = t;
        double r194710 = r194708 - r194709;
        double r194711 = r194707 * r194710;
        double r194712 = fma(r194705, r194706, r194711);
        double r194713 = 3.0;
        double r194714 = pow(r194712, r194713);
        double r194715 = cbrt(r194714);
        double r194716 = exp(r194715);
        double r194717 = r194692 * r194716;
        return r194717;
}

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.1

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

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

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

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

    \[\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 2020002 +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))))))