Average Error: 0.1 → 0.1
Time: 29.5s
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(z, \mathsf{fma}\left(-2, \log \left(\sqrt[3]{t}\right), 1\right) - \log \left(\sqrt[3]{t}\right), \mathsf{fma}\left(a - 0.5, b, x + y\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(z, \mathsf{fma}\left(-2, \log \left(\sqrt[3]{t}\right), 1\right) - \log \left(\sqrt[3]{t}\right), \mathsf{fma}\left(a - 0.5, b, x + y\right)\right)
double f(double x, double y, double z, double t, double a, double b) {
        double r259468 = x;
        double r259469 = y;
        double r259470 = r259468 + r259469;
        double r259471 = z;
        double r259472 = r259470 + r259471;
        double r259473 = t;
        double r259474 = log(r259473);
        double r259475 = r259471 * r259474;
        double r259476 = r259472 - r259475;
        double r259477 = a;
        double r259478 = 0.5;
        double r259479 = r259477 - r259478;
        double r259480 = b;
        double r259481 = r259479 * r259480;
        double r259482 = r259476 + r259481;
        return r259482;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r259483 = z;
        double r259484 = -2.0;
        double r259485 = t;
        double r259486 = cbrt(r259485);
        double r259487 = log(r259486);
        double r259488 = 1.0;
        double r259489 = fma(r259484, r259487, r259488);
        double r259490 = r259489 - r259487;
        double r259491 = a;
        double r259492 = 0.5;
        double r259493 = r259491 - r259492;
        double r259494 = b;
        double r259495 = x;
        double r259496 = y;
        double r259497 = r259495 + r259496;
        double r259498 = fma(r259493, r259494, r259497);
        double r259499 = fma(r259483, r259490, r259498);
        return r259499;
}

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 add-cube-cbrt0.1

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

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

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

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

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

Reproduce

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