Average Error: 0.3 → 0.3
Time: 33.6s
Precision: 64
\[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
\[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \mathsf{fma}\left(2 \cdot \log \left({\left(\frac{1}{t}\right)}^{\frac{-1}{3}}\right), a - 0.5, \log \left(\sqrt[3]{t}\right) \cdot \left(a - 0.5\right)\right)\]
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \mathsf{fma}\left(2 \cdot \log \left({\left(\frac{1}{t}\right)}^{\frac{-1}{3}}\right), a - 0.5, \log \left(\sqrt[3]{t}\right) \cdot \left(a - 0.5\right)\right)
double f(double x, double y, double z, double t, double a) {
        double r61749 = x;
        double r61750 = y;
        double r61751 = r61749 + r61750;
        double r61752 = log(r61751);
        double r61753 = z;
        double r61754 = log(r61753);
        double r61755 = r61752 + r61754;
        double r61756 = t;
        double r61757 = r61755 - r61756;
        double r61758 = a;
        double r61759 = 0.5;
        double r61760 = r61758 - r61759;
        double r61761 = log(r61756);
        double r61762 = r61760 * r61761;
        double r61763 = r61757 + r61762;
        return r61763;
}

double f(double x, double y, double z, double t, double a) {
        double r61764 = x;
        double r61765 = y;
        double r61766 = r61764 + r61765;
        double r61767 = log(r61766);
        double r61768 = z;
        double r61769 = log(r61768);
        double r61770 = r61767 + r61769;
        double r61771 = t;
        double r61772 = r61770 - r61771;
        double r61773 = 2.0;
        double r61774 = 1.0;
        double r61775 = r61774 / r61771;
        double r61776 = -0.3333333333333333;
        double r61777 = pow(r61775, r61776);
        double r61778 = log(r61777);
        double r61779 = r61773 * r61778;
        double r61780 = a;
        double r61781 = 0.5;
        double r61782 = r61780 - r61781;
        double r61783 = cbrt(r61771);
        double r61784 = log(r61783);
        double r61785 = r61784 * r61782;
        double r61786 = fma(r61779, r61782, r61785);
        double r61787 = r61772 + r61786;
        return r61787;
}

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

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

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

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

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

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

Reproduce

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