Average Error: 0.1 → 0.1
Time: 5.2s
Precision: 64
\[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\]
\[\mathsf{fma}\left(b, a - 0.5, \mathsf{fma}\left(z, 1 - \log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right), x + y\right) - z \cdot \log \left({t}^{\frac{1}{3}}\right)\right)\]
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\mathsf{fma}\left(b, a - 0.5, \mathsf{fma}\left(z, 1 - \log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right), x + y\right) - z \cdot \log \left({t}^{\frac{1}{3}}\right)\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r302700 = x;
        double r302701 = y;
        double r302702 = r302700 + r302701;
        double r302703 = z;
        double r302704 = r302702 + r302703;
        double r302705 = t;
        double r302706 = log(r302705);
        double r302707 = r302703 * r302706;
        double r302708 = r302704 - r302707;
        double r302709 = a;
        double r302710 = 0.5;
        double r302711 = r302709 - r302710;
        double r302712 = b;
        double r302713 = r302711 * r302712;
        double r302714 = r302708 + r302713;
        return r302714;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r302715 = b;
        double r302716 = a;
        double r302717 = 0.5;
        double r302718 = r302716 - r302717;
        double r302719 = z;
        double r302720 = 1.0;
        double r302721 = t;
        double r302722 = cbrt(r302721);
        double r302723 = r302722 * r302722;
        double r302724 = log(r302723);
        double r302725 = r302720 - r302724;
        double r302726 = x;
        double r302727 = y;
        double r302728 = r302726 + r302727;
        double r302729 = fma(r302719, r302725, r302728);
        double r302730 = 0.3333333333333333;
        double r302731 = pow(r302721, r302730);
        double r302732 = log(r302731);
        double r302733 = r302719 * r302732;
        double r302734 = r302729 - r302733;
        double r302735 = fma(r302715, r302718, r302734);
        return r302735;
}

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

Original0.1
Target0.3
Herbie0.1
\[\left(\left(x + y\right) + \frac{\left(1 - {\left(\log t\right)}^{2}\right) \cdot z}{1 + \log t}\right) + \left(a - 0.5\right) \cdot b\]

Derivation

  1. Initial program 0.1

    \[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\]
  2. Simplified0.1

    \[\leadsto \color{blue}{\mathsf{fma}\left(b, a - 0.5, \left(\left(x + y\right) + z\right) - z \cdot \log t\right)}\]
  3. Using strategy rm
  4. Applied add-cube-cbrt0.1

    \[\leadsto \mathsf{fma}\left(b, a - 0.5, \left(\left(x + y\right) + z\right) - z \cdot \log \color{blue}{\left(\left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) \cdot \sqrt[3]{t}\right)}\right)\]
  5. Applied log-prod0.1

    \[\leadsto \mathsf{fma}\left(b, a - 0.5, \left(\left(x + y\right) + z\right) - z \cdot \color{blue}{\left(\log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) + \log \left(\sqrt[3]{t}\right)\right)}\right)\]
  6. Applied distribute-lft-in0.1

    \[\leadsto \mathsf{fma}\left(b, a - 0.5, \left(\left(x + y\right) + z\right) - \color{blue}{\left(z \cdot \log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) + z \cdot \log \left(\sqrt[3]{t}\right)\right)}\right)\]
  7. Applied associate--r+0.1

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

    \[\leadsto \mathsf{fma}\left(b, a - 0.5, \color{blue}{\mathsf{fma}\left(z, 1 - \log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right), x + y\right)} - z \cdot \log \left(\sqrt[3]{t}\right)\right)\]
  9. Using strategy rm
  10. Applied pow1/30.1

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

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

Reproduce

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

  :herbie-target
  (+ (+ (+ x y) (/ (* (- 1 (pow (log t) 2)) z) (+ 1 (log t)))) (* (- a 0.5) b))

  (+ (- (+ (+ x y) z) (* z (log t))) (* (- a 0.5) b)))