Average Error: 1.9 → 1.8
Time: 42.8s
Precision: 64
\[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}{y}\]
\[\frac{\frac{x}{\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{e^{\mathsf{fma}\left(\log a, t - 1.0, \log z \cdot y\right) - b}}}}{\sqrt[3]{y}}\]
\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}{y}
\frac{\frac{x}{\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{e^{\mathsf{fma}\left(\log a, t - 1.0, \log z \cdot y\right) - b}}}}{\sqrt[3]{y}}
double f(double x, double y, double z, double t, double a, double b) {
        double r22460416 = x;
        double r22460417 = y;
        double r22460418 = z;
        double r22460419 = log(r22460418);
        double r22460420 = r22460417 * r22460419;
        double r22460421 = t;
        double r22460422 = 1.0;
        double r22460423 = r22460421 - r22460422;
        double r22460424 = a;
        double r22460425 = log(r22460424);
        double r22460426 = r22460423 * r22460425;
        double r22460427 = r22460420 + r22460426;
        double r22460428 = b;
        double r22460429 = r22460427 - r22460428;
        double r22460430 = exp(r22460429);
        double r22460431 = r22460416 * r22460430;
        double r22460432 = r22460431 / r22460417;
        return r22460432;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r22460433 = x;
        double r22460434 = y;
        double r22460435 = cbrt(r22460434);
        double r22460436 = r22460435 * r22460435;
        double r22460437 = a;
        double r22460438 = log(r22460437);
        double r22460439 = t;
        double r22460440 = 1.0;
        double r22460441 = r22460439 - r22460440;
        double r22460442 = z;
        double r22460443 = log(r22460442);
        double r22460444 = r22460443 * r22460434;
        double r22460445 = fma(r22460438, r22460441, r22460444);
        double r22460446 = b;
        double r22460447 = r22460445 - r22460446;
        double r22460448 = exp(r22460447);
        double r22460449 = r22460436 / r22460448;
        double r22460450 = r22460433 / r22460449;
        double r22460451 = r22460450 / r22460435;
        return r22460451;
}

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

Target

Original1.9
Target10.9
Herbie1.8
\[\begin{array}{l} \mathbf{if}\;t \lt -0.8845848504127471:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{\left(t - 1.0\right)}}{y}}{\left(b + 1\right) - y \cdot \log z}\\ \mathbf{elif}\;t \lt 852031.2288374073:\\ \;\;\;\;\frac{\frac{x}{y} \cdot {a}^{\left(t - 1.0\right)}}{e^{b - \log z \cdot y}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \frac{{a}^{\left(t - 1.0\right)}}{y}}{\left(b + 1\right) - y \cdot \log z}\\ \end{array}\]

Derivation

  1. Initial program 1.9

    \[\frac{x \cdot e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}{y}\]
  2. Using strategy rm
  3. Applied add-cube-cbrt2.0

    \[\leadsto \frac{x \cdot \color{blue}{\left(\left(\sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}} \cdot \sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}\right) \cdot \sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}\right)}}{y}\]
  4. Using strategy rm
  5. Applied add-cube-cbrt2.0

    \[\leadsto \frac{x \cdot \left(\left(\sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}} \cdot \sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}\right) \cdot \sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}\right)}{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}\]
  6. Applied associate-/r*2.0

    \[\leadsto \color{blue}{\frac{\frac{x \cdot \left(\left(\sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}} \cdot \sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}\right) \cdot \sqrt[3]{e^{\left(y \cdot \log z + \left(t - 1.0\right) \cdot \log a\right) - b}}\right)}{\sqrt[3]{y} \cdot \sqrt[3]{y}}}{\sqrt[3]{y}}}\]
  7. Simplified1.8

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

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

Reproduce

herbie shell --seed 2019162 +o rules:numerics
(FPCore (x y z t a b)
  :name "Numeric.SpecFunctions:incompleteBetaWorker from math-functions-0.1.5.2, A"

  :herbie-target
  (if (< t -0.8845848504127471) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1) (* y (log z)))) (if (< t 852031.2288374073) (/ (* (/ x y) (pow a (- t 1.0))) (exp (- b (* (log z) y)))) (/ (* x (/ (pow a (- t 1.0)) y)) (- (+ b 1) (* y (log z))))))

  (/ (* x (exp (- (+ (* y (log z)) (* (- t 1.0) (log a))) b))) y))