Average Error: 0.1 → 0.1
Time: 28.0s
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 r260765 = x;
        double r260766 = y;
        double r260767 = r260765 + r260766;
        double r260768 = z;
        double r260769 = r260767 + r260768;
        double r260770 = t;
        double r260771 = log(r260770);
        double r260772 = r260768 * r260771;
        double r260773 = r260769 - r260772;
        double r260774 = a;
        double r260775 = 0.5;
        double r260776 = r260774 - r260775;
        double r260777 = b;
        double r260778 = r260776 * r260777;
        double r260779 = r260773 + r260778;
        return r260779;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r260780 = z;
        double r260781 = -r260780;
        double r260782 = t;
        double r260783 = log(r260782);
        double r260784 = cbrt(r260780);
        double r260785 = 3.0;
        double r260786 = pow(r260784, r260785);
        double r260787 = fma(r260781, r260783, r260786);
        double r260788 = 0.0;
        double r260789 = r260783 * r260788;
        double r260790 = r260780 * r260789;
        double r260791 = r260787 + r260790;
        double r260792 = a;
        double r260793 = 0.5;
        double r260794 = r260792 - r260793;
        double r260795 = b;
        double r260796 = x;
        double r260797 = y;
        double r260798 = r260796 + r260797;
        double r260799 = fma(r260794, r260795, r260798);
        double r260800 = r260791 + r260799;
        return r260800;
}

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)))