Average Error: 0.3 → 0.3
Time: 10.4s
Precision: 64
\[\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t\]
\[\left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \left(a - 0.5\right) \cdot \log t\]
\left(\left(\log \left(x + y\right) + \log z\right) - t\right) + \left(a - 0.5\right) \cdot \log t
\left(\log \left(x + y\right) + \left(\log z - t\right)\right) + \left(a - 0.5\right) \cdot \log t
double f(double x, double y, double z, double t, double a) {
        double r49631 = x;
        double r49632 = y;
        double r49633 = r49631 + r49632;
        double r49634 = log(r49633);
        double r49635 = z;
        double r49636 = log(r49635);
        double r49637 = r49634 + r49636;
        double r49638 = t;
        double r49639 = r49637 - r49638;
        double r49640 = a;
        double r49641 = 0.5;
        double r49642 = r49640 - r49641;
        double r49643 = log(r49638);
        double r49644 = r49642 * r49643;
        double r49645 = r49639 + r49644;
        return r49645;
}

double f(double x, double y, double z, double t, double a) {
        double r49646 = x;
        double r49647 = y;
        double r49648 = r49646 + r49647;
        double r49649 = log(r49648);
        double r49650 = z;
        double r49651 = log(r49650);
        double r49652 = t;
        double r49653 = r49651 - r49652;
        double r49654 = r49649 + r49653;
        double r49655 = a;
        double r49656 = 0.5;
        double r49657 = r49655 - r49656;
        double r49658 = log(r49652);
        double r49659 = r49657 * r49658;
        double r49660 = r49654 + r49659;
        return r49660;
}

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. Using strategy rm
  6. Applied associate-+r+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}\]
  7. Final simplification0.3

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

Reproduce

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