Average Error: 0.3 → 0.3
Time: 11.8s
Precision: 64
\[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
\[\left(\left(\mathsf{fma}\left(2, \log \left(\sqrt[3]{1} \cdot {z}^{\frac{1}{3}}\right), \log \left(x + y\right)\right) + \log \left(\sqrt[3]{z}\right)\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\left(\left(\mathsf{fma}\left(2, \log \left(\sqrt[3]{1} \cdot {z}^{\frac{1}{3}}\right), \log \left(x + y\right)\right) + \log \left(\sqrt[3]{z}\right)\right) - t\right) + \left(a - 0.5\right) \cdot \log t
double f(double x, double y, double z, double t, double a) {
        double r315852 = x;
        double r315853 = y;
        double r315854 = r315852 + r315853;
        double r315855 = log(r315854);
        double r315856 = z;
        double r315857 = log(r315856);
        double r315858 = r315855 + r315857;
        double r315859 = t;
        double r315860 = r315858 - r315859;
        double r315861 = a;
        double r315862 = 0.5;
        double r315863 = r315861 - r315862;
        double r315864 = log(r315859);
        double r315865 = r315863 * r315864;
        double r315866 = r315860 + r315865;
        return r315866;
}

double f(double x, double y, double z, double t, double a) {
        double r315867 = 2.0;
        double r315868 = 1.0;
        double r315869 = cbrt(r315868);
        double r315870 = z;
        double r315871 = 0.3333333333333333;
        double r315872 = pow(r315870, r315871);
        double r315873 = r315869 * r315872;
        double r315874 = log(r315873);
        double r315875 = x;
        double r315876 = y;
        double r315877 = r315875 + r315876;
        double r315878 = log(r315877);
        double r315879 = fma(r315867, r315874, r315878);
        double r315880 = cbrt(r315870);
        double r315881 = log(r315880);
        double r315882 = r315879 + r315881;
        double r315883 = t;
        double r315884 = r315882 - r315883;
        double r315885 = a;
        double r315886 = 0.5;
        double r315887 = r315885 - r315886;
        double r315888 = log(r315883);
        double r315889 = r315887 * r315888;
        double r315890 = r315884 + r315889;
        return r315890;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Target

Original0.3
Target0.3
Herbie0.3
\[\log \left(x + y\right) + \left(\left(\log z - t\right) + \left(a - 0.5\right) \cdot \log t\right)\]

Derivation

  1. Initial program 0.3

    \[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
  2. Using strategy rm
  3. Applied add-cube-cbrt0.3

    \[\leadsto \left(\left(\log \left(x + y\right) + \log \color{blue}{\left(\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}\right)}\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
  4. Applied log-prod0.3

    \[\leadsto \left(\left(\log \left(x + y\right) + \color{blue}{\left(\log \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) + \log \left(\sqrt[3]{z}\right)\right)}\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
  5. Applied associate-+r+0.3

    \[\leadsto \left(\color{blue}{\left(\left(\log \left(x + y\right) + \log \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right)\right) + \log \left(\sqrt[3]{z}\right)\right)} - t\right) + \left(a - 0.5\right) \cdot \log t\]
  6. Simplified0.3

    \[\leadsto \left(\left(\color{blue}{\mathsf{fma}\left(2, \log \left(\sqrt[3]{z}\right), \log \left(x + y\right)\right)} + \log \left(\sqrt[3]{z}\right)\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
  7. Using strategy rm
  8. Applied *-un-lft-identity0.3

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

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

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

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

Reproduce

herbie shell --seed 2020065 +o rules:numerics
(FPCore (x y z t a)
  :name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
  :precision binary64

  :herbie-target
  (+ (log (+ x y)) (+ (- (log z) t) (* (- a 0.5) (log t))))

  (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))