Average Error: 0.3 → 0.3
Time: 12.0s
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]{\sqrt{z}}\right), \log \left(x + y\right)\right) + \log \left(\sqrt[3]{\sqrt{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(\mathsf{fma}\left(2, \log \left(\sqrt[3]{\sqrt{z}}\right), \log \left(x + y\right)\right) + \log \left(\sqrt[3]{\sqrt{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 r59745 = x;
        double r59746 = y;
        double r59747 = r59745 + r59746;
        double r59748 = log(r59747);
        double r59749 = z;
        double r59750 = log(r59749);
        double r59751 = r59748 + r59750;
        double r59752 = t;
        double r59753 = r59751 - r59752;
        double r59754 = a;
        double r59755 = 0.5;
        double r59756 = r59754 - r59755;
        double r59757 = log(r59752);
        double r59758 = r59756 * r59757;
        double r59759 = r59753 + r59758;
        return r59759;
}

double f(double x, double y, double z, double t, double a) {
        double r59760 = 2.0;
        double r59761 = z;
        double r59762 = sqrt(r59761);
        double r59763 = cbrt(r59762);
        double r59764 = log(r59763);
        double r59765 = x;
        double r59766 = y;
        double r59767 = r59765 + r59766;
        double r59768 = log(r59767);
        double r59769 = fma(r59760, r59764, r59768);
        double r59770 = r59769 + r59764;
        double r59771 = log(r59762);
        double r59772 = r59770 + r59771;
        double r59773 = t;
        double r59774 = log(r59773);
        double r59775 = a;
        double r59776 = 0.5;
        double r59777 = r59775 - r59776;
        double r59778 = -r59773;
        double r59779 = fma(r59774, r59777, r59778);
        double r59780 = r59772 + r59779;
        return r59780;
}

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

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

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

    \[\leadsto \left(\left(\color{blue}{\mathsf{fma}\left(2, \log \left(\sqrt[3]{\sqrt{z}}\right), \log \left(x + y\right)\right)} + \log \left(\sqrt[3]{\sqrt{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(\mathsf{fma}\left(2, \log \left(\sqrt[3]{\sqrt{z}}\right), \log \left(x + y\right)\right) + \log \left(\sqrt[3]{\sqrt{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))))