Average Error: 0.1 → 0.1
Time: 30.3s
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) + z \cdot \left(\log t \cdot 0\right)\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) + z \cdot \left(\log t \cdot 0\right)\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 r232431 = x;
        double r232432 = y;
        double r232433 = r232431 + r232432;
        double r232434 = z;
        double r232435 = r232433 + r232434;
        double r232436 = t;
        double r232437 = log(r232436);
        double r232438 = r232434 * r232437;
        double r232439 = r232435 - r232438;
        double r232440 = a;
        double r232441 = 0.5;
        double r232442 = r232440 - r232441;
        double r232443 = b;
        double r232444 = r232442 * r232443;
        double r232445 = r232439 + r232444;
        return r232445;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r232446 = z;
        double r232447 = -r232446;
        double r232448 = t;
        double r232449 = log(r232448);
        double r232450 = cbrt(r232446);
        double r232451 = 3.0;
        double r232452 = pow(r232450, r232451);
        double r232453 = fma(r232447, r232449, r232452);
        double r232454 = 0.0;
        double r232455 = r232449 * r232454;
        double r232456 = r232446 * r232455;
        double r232457 = r232453 + r232456;
        double r232458 = a;
        double r232459 = 0.5;
        double r232460 = r232458 - r232459;
        double r232461 = b;
        double r232462 = x;
        double r232463 = y;
        double r232464 = r232462 + r232463;
        double r232465 = fma(r232460, r232461, r232464);
        double r232466 = r232457 + r232465;
        return r232466;
}

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}{z \cdot \left(\log t \cdot 0\right)}\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) + z \cdot \left(\log t \cdot 0\right)\right) + \mathsf{fma}\left(a - 0.5, b, x + y\right)\]

Reproduce

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