Average Error: 0.3 → 0.3
Time: 47.8s
Precision: 64
\[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
\[\log \left(y + x\right) + \left(\left(\log z - t\right) + \left(a - 0.5\right) \cdot \log t\right)\]
double f(double x, double y, double z, double t, double a) {
        double r3668591 = x;
        double r3668592 = y;
        double r3668593 = r3668591 + r3668592;
        double r3668594 = log(r3668593);
        double r3668595 = z;
        double r3668596 = log(r3668595);
        double r3668597 = r3668594 + r3668596;
        double r3668598 = t;
        double r3668599 = r3668597 - r3668598;
        double r3668600 = a;
        double r3668601 = 0.5;
        double r3668602 = r3668600 - r3668601;
        double r3668603 = log(r3668598);
        double r3668604 = r3668602 * r3668603;
        double r3668605 = r3668599 + r3668604;
        return r3668605;
}

double f(double x, double y, double z, double t, double a) {
        double r3668606 = y;
        double r3668607 = x;
        double r3668608 = r3668606 + r3668607;
        double r3668609 = log(r3668608);
        double r3668610 = z;
        double r3668611 = log(r3668610);
        double r3668612 = t;
        double r3668613 = r3668611 - r3668612;
        double r3668614 = a;
        double r3668615 = 0.5;
        double r3668616 = r3668614 - r3668615;
        double r3668617 = log(r3668612);
        double r3668618 = r3668616 * r3668617;
        double r3668619 = r3668613 + r3668618;
        double r3668620 = r3668609 + r3668619;
        return r3668620;
}

\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\log \left(y + x\right) + \left(\left(\log z - t\right) + \left(a - 0.5\right) \cdot \log t\right)

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 associate--l+0.3

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

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

    \[\leadsto \log \left(y + x\right) + \left(\left(\log z - t\right) + \left(a - 0.5\right) \cdot \log t\right)\]

Reproduce

herbie shell --seed 2019102 
(FPCore (x y z t a)
  :name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
  (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))