Average Error: 0.3 → 0.3
Time: 12.3s
Precision: 64
\[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
\[\left(\left(\left(\log \left(x + y\right) + \log \left(\sqrt{\sqrt[3]{z} \cdot \sqrt[3]{z}}\right)\right) + \log \left(\sqrt{\sqrt[3]{z}}\right)\right) + \log \left(\sqrt{z}\right)\right) + \mathsf{fma}\left(\log t, a - 0.5, -t\right)\]
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\left(\left(\left(\log \left(x + y\right) + \log \left(\sqrt{\sqrt[3]{z} \cdot \sqrt[3]{z}}\right)\right) + \log \left(\sqrt{\sqrt[3]{z}}\right)\right) + \log \left(\sqrt{z}\right)\right) + \mathsf{fma}\left(\log t, a - 0.5, -t\right)
double f(double x, double y, double z, double t, double a) {
        double r58079 = x;
        double r58080 = y;
        double r58081 = r58079 + r58080;
        double r58082 = log(r58081);
        double r58083 = z;
        double r58084 = log(r58083);
        double r58085 = r58082 + r58084;
        double r58086 = t;
        double r58087 = r58085 - r58086;
        double r58088 = a;
        double r58089 = 0.5;
        double r58090 = r58088 - r58089;
        double r58091 = log(r58086);
        double r58092 = r58090 * r58091;
        double r58093 = r58087 + r58092;
        return r58093;
}

double f(double x, double y, double z, double t, double a) {
        double r58094 = x;
        double r58095 = y;
        double r58096 = r58094 + r58095;
        double r58097 = log(r58096);
        double r58098 = z;
        double r58099 = cbrt(r58098);
        double r58100 = r58099 * r58099;
        double r58101 = sqrt(r58100);
        double r58102 = log(r58101);
        double r58103 = r58097 + r58102;
        double r58104 = sqrt(r58099);
        double r58105 = log(r58104);
        double r58106 = r58103 + r58105;
        double r58107 = sqrt(r58098);
        double r58108 = log(r58107);
        double r58109 = r58106 + r58108;
        double r58110 = t;
        double r58111 = log(r58110);
        double r58112 = a;
        double r58113 = 0.5;
        double r58114 = r58112 - r58113;
        double r58115 = -r58110;
        double r58116 = fma(r58111, r58114, r58115);
        double r58117 = r58109 + r58116;
        return r58117;
}

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 sub-neg0.3

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

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

    \[\leadsto \left(\log \left(x + y\right) + \log z\right) + \color{blue}{\mathsf{fma}\left(\log t, a - 0.5, -t\right)}\]
  6. Using strategy rm
  7. Applied add-sqr-sqrt0.3

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

    \[\leadsto \left(\log \left(x + y\right) + \color{blue}{\left(\log \left(\sqrt{z}\right) + \log \left(\sqrt{z}\right)\right)}\right) + \mathsf{fma}\left(\log t, a - 0.5, -t\right)\]
  9. Applied associate-+r+0.3

    \[\leadsto \color{blue}{\left(\left(\log \left(x + y\right) + \log \left(\sqrt{z}\right)\right) + \log \left(\sqrt{z}\right)\right)} + \mathsf{fma}\left(\log t, a - 0.5, -t\right)\]
  10. Using strategy rm
  11. Applied add-cube-cbrt0.3

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

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

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

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

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

Reproduce

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