Average Error: 0.1 → 0.1
Time: 24.8s
Precision: 64
\[\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b\]
\[\left(\mathsf{fma}\left(z, -\log t, {\left(\sqrt[3]{z}\right)}^{3}\right) + \left(0 \cdot \log t\right) \cdot z\right) + \mathsf{fma}\left(a - 0.5, b, x + y\right)\]
\left(\left(\left(x + y\right) + z\right) - z \cdot \log t\right) + \left(a - 0.5\right) \cdot b
\left(\mathsf{fma}\left(z, -\log t, {\left(\sqrt[3]{z}\right)}^{3}\right) + \left(0 \cdot \log t\right) \cdot z\right) + \mathsf{fma}\left(a - 0.5, b, x + y\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r263568 = x;
        double r263569 = y;
        double r263570 = r263568 + r263569;
        double r263571 = z;
        double r263572 = r263570 + r263571;
        double r263573 = t;
        double r263574 = log(r263573);
        double r263575 = r263571 * r263574;
        double r263576 = r263572 - r263575;
        double r263577 = a;
        double r263578 = 0.5;
        double r263579 = r263577 - r263578;
        double r263580 = b;
        double r263581 = r263579 * r263580;
        double r263582 = r263576 + r263581;
        return r263582;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r263583 = z;
        double r263584 = t;
        double r263585 = log(r263584);
        double r263586 = -r263585;
        double r263587 = cbrt(r263583);
        double r263588 = 3.0;
        double r263589 = pow(r263587, r263588);
        double r263590 = fma(r263583, r263586, r263589);
        double r263591 = 0.0;
        double r263592 = r263591 * r263585;
        double r263593 = r263592 * r263583;
        double r263594 = r263590 + r263593;
        double r263595 = a;
        double r263596 = 0.5;
        double r263597 = r263595 - r263596;
        double r263598 = b;
        double r263599 = x;
        double r263600 = y;
        double r263601 = r263599 + r263600;
        double r263602 = fma(r263597, r263598, r263601);
        double r263603 = r263594 + r263602;
        return r263603;
}

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.4
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(z, 1 - \log t, \mathsf{fma}\left(a - 0.5, b, x + y\right)\right)}\]
  3. Using strategy rm
  4. Applied fma-udef0.1

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

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

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

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

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

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

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

Reproduce

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