Average Error: 0.3 → 0.3
Time: 40.4s
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(a - 0.5, \log t, \log \left(\sqrt{x + y}\right) + \left(\left(\log \left(\left|\sqrt[3]{x + y}\right|\right) + \log \left(\sqrt{\sqrt[3]{x + y}}\right)\right) + \left(\log z - t\right)\right)\right)\]
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\mathsf{fma}\left(a - 0.5, \log t, \log \left(\sqrt{x + y}\right) + \left(\left(\log \left(\left|\sqrt[3]{x + y}\right|\right) + \log \left(\sqrt{\sqrt[3]{x + y}}\right)\right) + \left(\log z - t\right)\right)\right)
double f(double x, double y, double z, double t, double a) {
        double r53358 = x;
        double r53359 = y;
        double r53360 = r53358 + r53359;
        double r53361 = log(r53360);
        double r53362 = z;
        double r53363 = log(r53362);
        double r53364 = r53361 + r53363;
        double r53365 = t;
        double r53366 = r53364 - r53365;
        double r53367 = a;
        double r53368 = 0.5;
        double r53369 = r53367 - r53368;
        double r53370 = log(r53365);
        double r53371 = r53369 * r53370;
        double r53372 = r53366 + r53371;
        return r53372;
}

double f(double x, double y, double z, double t, double a) {
        double r53373 = a;
        double r53374 = 0.5;
        double r53375 = r53373 - r53374;
        double r53376 = t;
        double r53377 = log(r53376);
        double r53378 = x;
        double r53379 = y;
        double r53380 = r53378 + r53379;
        double r53381 = sqrt(r53380);
        double r53382 = log(r53381);
        double r53383 = cbrt(r53380);
        double r53384 = fabs(r53383);
        double r53385 = log(r53384);
        double r53386 = sqrt(r53383);
        double r53387 = log(r53386);
        double r53388 = r53385 + r53387;
        double r53389 = z;
        double r53390 = log(r53389);
        double r53391 = r53390 - r53376;
        double r53392 = r53388 + r53391;
        double r53393 = r53382 + r53392;
        double r53394 = fma(r53375, r53377, r53393);
        return r53394;
}

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. Simplified0.3

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

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

    \[\leadsto \mathsf{fma}\left(a - 0.5, \log t, \color{blue}{1 \cdot \left(\log \left(x + y\right) + \log z\right)} - 1 \cdot t\right)\]
  6. Applied distribute-lft-out--0.3

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

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

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

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

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

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

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

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

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

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

Reproduce

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