Average Error: 0.3 → 0.3
Time: 11.2s
Precision: 64
\[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
\[\mathsf{fma}\left(\log \left(\sqrt[3]{t} \cdot {t}^{\frac{1}{3}}\right), a - 0.5, \left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log \left(\sqrt[3]{t}\right)\]
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\mathsf{fma}\left(\log \left(\sqrt[3]{t} \cdot {t}^{\frac{1}{3}}\right), a - 0.5, \left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log \left(\sqrt[3]{t}\right)
double f(double x, double y, double z, double t, double a) {
        double r44898 = x;
        double r44899 = y;
        double r44900 = r44898 + r44899;
        double r44901 = log(r44900);
        double r44902 = z;
        double r44903 = log(r44902);
        double r44904 = r44901 + r44903;
        double r44905 = t;
        double r44906 = r44904 - r44905;
        double r44907 = a;
        double r44908 = 0.5;
        double r44909 = r44907 - r44908;
        double r44910 = log(r44905);
        double r44911 = r44909 * r44910;
        double r44912 = r44906 + r44911;
        return r44912;
}

double f(double x, double y, double z, double t, double a) {
        double r44913 = t;
        double r44914 = cbrt(r44913);
        double r44915 = 0.3333333333333333;
        double r44916 = pow(r44913, r44915);
        double r44917 = r44914 * r44916;
        double r44918 = log(r44917);
        double r44919 = a;
        double r44920 = 0.5;
        double r44921 = r44919 - r44920;
        double r44922 = x;
        double r44923 = y;
        double r44924 = r44922 + r44923;
        double r44925 = log(r44924);
        double r44926 = z;
        double r44927 = log(r44926);
        double r44928 = r44925 + r44927;
        double r44929 = r44928 - r44913;
        double r44930 = fma(r44918, r44921, r44929);
        double r44931 = log(r44914);
        double r44932 = r44921 * r44931;
        double r44933 = r44930 + r44932;
        return r44933;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

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 z\right) - t\right) + \left(a - 0.5\right) \cdot \log \color{blue}{\left(\left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right) \cdot \sqrt[3]{t}\right)}\]
  4. Applied log-prod0.3

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

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(\log \left(\sqrt[3]{t} \cdot \sqrt[3]{t}\right), a - 0.5, \left(\log \left(x + y\right) + \log z\right) - t\right)} + \left(a - 0.5\right) \cdot \log \left(\sqrt[3]{t}\right)\]
  8. Using strategy rm
  9. Applied pow1/30.3

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

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

Reproduce

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