Average Error: 0.1 → 0.1
Time: 22.8s
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(\left(1 - 2 \cdot \log \left(\sqrt[3]{t}\right)\right) - \log \left({\left(\frac{1}{t}\right)}^{\frac{-1}{3}}\right), z, y\right)\right) + x\]
\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(\left(1 - 2 \cdot \log \left(\sqrt[3]{t}\right)\right) - \log \left({\left(\frac{1}{t}\right)}^{\frac{-1}{3}}\right), z, y\right)\right) + x
double f(double x, double y, double z, double t, double a, double b) {
        double r247863 = x;
        double r247864 = y;
        double r247865 = r247863 + r247864;
        double r247866 = z;
        double r247867 = r247865 + r247866;
        double r247868 = t;
        double r247869 = log(r247868);
        double r247870 = r247866 * r247869;
        double r247871 = r247867 - r247870;
        double r247872 = a;
        double r247873 = 0.5;
        double r247874 = r247872 - r247873;
        double r247875 = b;
        double r247876 = r247874 * r247875;
        double r247877 = r247871 + r247876;
        return r247877;
}

double f(double x, double y, double z, double t, double a, double b) {
        double r247878 = b;
        double r247879 = a;
        double r247880 = 0.5;
        double r247881 = r247879 - r247880;
        double r247882 = 1.0;
        double r247883 = 2.0;
        double r247884 = t;
        double r247885 = cbrt(r247884);
        double r247886 = log(r247885);
        double r247887 = r247883 * r247886;
        double r247888 = r247882 - r247887;
        double r247889 = r247882 / r247884;
        double r247890 = -0.3333333333333333;
        double r247891 = pow(r247889, r247890);
        double r247892 = log(r247891);
        double r247893 = r247888 - r247892;
        double r247894 = z;
        double r247895 = y;
        double r247896 = fma(r247893, r247894, r247895);
        double r247897 = fma(r247878, r247881, r247896);
        double r247898 = x;
        double r247899 = r247897 + r247898;
        return r247899;
}

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

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

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

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

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

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

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

Reproduce

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