Average Error: 2.0 → 0.2
Time: 18.5s
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 r198214 = x;
        double r198215 = y;
        double r198216 = z;
        double r198217 = log(r198216);
        double r198218 = t;
        double r198219 = r198217 - r198218;
        double r198220 = r198215 * r198219;
        double r198221 = a;
        double r198222 = 1.0;
        double r198223 = r198222 - r198216;
        double r198224 = log(r198223);
        double r198225 = b;
        double r198226 = r198224 - r198225;
        double r198227 = r198221 * r198226;
        double r198228 = r198220 + r198227;
        double r198229 = exp(r198228);
        double r198230 = r198214 * r198229;
        return r198230;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r198231 = x;
        double r198232 = 1.0;
        double r198233 = log(r198232);
        double r198234 = 0.5;
        double r198235 = z;
        double r198236 = 2.0;
        double r198237 = pow(r198235, r198236);
        double r198238 = pow(r198232, r198236);
        double r198239 = r198237 / r198238;
        double r198240 = r198232 * r198235;
        double r198241 = fma(r198234, r198239, r198240);
        double r198242 = b;
        double r198243 = r198241 + r198242;
        double r198244 = r198233 - r198243;
        double r198245 = a;
        double r198246 = y;
        double r198247 = log(r198235);
        double r198248 = t;
        double r198249 = r198247 - r198248;
        double r198250 = r198246 * r198249;
        double r198251 = fma(r198244, r198245, r198250);
        double r198252 = 3.0;
        double r198253 = pow(r198251, r198252);
        double r198254 = cbrt(r198253);
        double r198255 = exp(r198254);
        double r198256 = r198231 * r198255;
        return r198256;
}

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. 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 2020062 +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))))))