Average Error: 0.3 → 0.3
Time: 29.3s
Precision: 64
\[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
\[\log \left(x + y\right) + \left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)\]
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\log \left(x + y\right) + \left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)
double f(double x, double y, double z, double t, double a) {
        double r61459 = x;
        double r61460 = y;
        double r61461 = r61459 + r61460;
        double r61462 = log(r61461);
        double r61463 = z;
        double r61464 = log(r61463);
        double r61465 = r61462 + r61464;
        double r61466 = t;
        double r61467 = r61465 - r61466;
        double r61468 = a;
        double r61469 = 0.5;
        double r61470 = r61468 - r61469;
        double r61471 = log(r61466);
        double r61472 = r61470 * r61471;
        double r61473 = r61467 + r61472;
        return r61473;
}

double f(double x, double y, double z, double t, double a) {
        double r61474 = x;
        double r61475 = y;
        double r61476 = r61474 + r61475;
        double r61477 = log(r61476);
        double r61478 = z;
        double r61479 = log(r61478);
        double r61480 = t;
        double r61481 = r61479 - r61480;
        double r61482 = a;
        double r61483 = 1.0;
        double r61484 = 2.0;
        double r61485 = r61483 / r61484;
        double r61486 = r61482 - r61485;
        double r61487 = log(r61480);
        double r61488 = r61486 * r61487;
        double r61489 = r61481 + r61488;
        double r61490 = r61477 + r61489;
        return r61490;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

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

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

    \[\leadsto \log \left(x + y\right) + \left(\left(\log z - t\right) + \left(a - \frac{1}{2}\right) \cdot \log t\right)\]

Reproduce

herbie shell --seed 2019303 
(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))))