Average Error: 0.3 → 0.3
Time: 20.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(2 \cdot \log \left(\sqrt{\sqrt[3]{t}} \cdot \sqrt{\sqrt[3]{t}}\right), a - 0.5, \left(\log \left(x + y\right) + \log z\right) - t\right) + \log \left({t}^{\frac{1}{3}}\right) \cdot \left(a - 0.5\right)\]
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\mathsf{fma}\left(2 \cdot \log \left(\sqrt{\sqrt[3]{t}} \cdot \sqrt{\sqrt[3]{t}}\right), a - 0.5, \left(\log \left(x + y\right) + \log z\right) - t\right) + \log \left({t}^{\frac{1}{3}}\right) \cdot \left(a - 0.5\right)
double f(double x, double y, double z, double t, double a) {
        double r50621 = x;
        double r50622 = y;
        double r50623 = r50621 + r50622;
        double r50624 = log(r50623);
        double r50625 = z;
        double r50626 = log(r50625);
        double r50627 = r50624 + r50626;
        double r50628 = t;
        double r50629 = r50627 - r50628;
        double r50630 = a;
        double r50631 = 0.5;
        double r50632 = r50630 - r50631;
        double r50633 = log(r50628);
        double r50634 = r50632 * r50633;
        double r50635 = r50629 + r50634;
        return r50635;
}

double f(double x, double y, double z, double t, double a) {
        double r50636 = 2.0;
        double r50637 = t;
        double r50638 = cbrt(r50637);
        double r50639 = sqrt(r50638);
        double r50640 = r50639 * r50639;
        double r50641 = log(r50640);
        double r50642 = r50636 * r50641;
        double r50643 = a;
        double r50644 = 0.5;
        double r50645 = r50643 - r50644;
        double r50646 = x;
        double r50647 = y;
        double r50648 = r50646 + r50647;
        double r50649 = log(r50648);
        double r50650 = z;
        double r50651 = log(r50650);
        double r50652 = r50649 + r50651;
        double r50653 = r50652 - r50637;
        double r50654 = fma(r50642, r50645, r50653);
        double r50655 = 0.3333333333333333;
        double r50656 = pow(r50637, r50655);
        double r50657 = log(r50656);
        double r50658 = r50657 * r50645;
        double r50659 = r50654 + r50658;
        return r50659;
}

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-rgt-in0.3

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

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

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

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

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

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

Reproduce

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