Average Error: 1.8 → 0.2
Time: 15.9s
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 z - t, y, \mathsf{fma}\left(a, \log 1, -\mathsf{fma}\left(a, b, 1 \cdot \left(a \cdot z\right)\right)\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 z - t, y, \mathsf{fma}\left(a, \log 1, -\mathsf{fma}\left(a, b, 1 \cdot \left(a \cdot z\right)\right)\right)\right)\right)}^{3}}}
double f(double x, double y, double z, double t, double a, double b) {
        double r111275 = x;
        double r111276 = y;
        double r111277 = z;
        double r111278 = log(r111277);
        double r111279 = t;
        double r111280 = r111278 - r111279;
        double r111281 = r111276 * r111280;
        double r111282 = a;
        double r111283 = 1.0;
        double r111284 = r111283 - r111277;
        double r111285 = log(r111284);
        double r111286 = b;
        double r111287 = r111285 - r111286;
        double r111288 = r111282 * r111287;
        double r111289 = r111281 + r111288;
        double r111290 = exp(r111289);
        double r111291 = r111275 * r111290;
        return r111291;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r111292 = x;
        double r111293 = z;
        double r111294 = log(r111293);
        double r111295 = t;
        double r111296 = r111294 - r111295;
        double r111297 = y;
        double r111298 = a;
        double r111299 = 1.0;
        double r111300 = log(r111299);
        double r111301 = b;
        double r111302 = r111298 * r111293;
        double r111303 = r111299 * r111302;
        double r111304 = fma(r111298, r111301, r111303);
        double r111305 = -r111304;
        double r111306 = fma(r111298, r111300, r111305);
        double r111307 = fma(r111296, r111297, r111306);
        double r111308 = 3.0;
        double r111309 = pow(r111307, r111308);
        double r111310 = cbrt(r111309);
        double r111311 = exp(r111310);
        double r111312 = r111292 * r111311;
        return r111312;
}

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

    \[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) + \color{blue}{\left(a \cdot \log 1 - \left(a \cdot b + 1 \cdot \left(a \cdot z\right)\right)\right)}}\]
  3. Simplified0.4

    \[\leadsto x \cdot e^{y \cdot \left(\log z - t\right) + \color{blue}{\mathsf{fma}\left(a, \log 1, -\mathsf{fma}\left(a, b, 1 \cdot \left(a \cdot z\right)\right)\right)}}\]
  4. Using strategy rm
  5. Applied add-cbrt-cube0.4

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

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

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

Reproduce

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