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) + \log z\right) - \left(t - \left(a - 0.5\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
\left(\log \left(x + y\right) + \log z\right) - \left(t - \left(a - 0.5\right) \cdot \log t\right)
double f(double x, double y, double z, double t, double a) {
        double r371559 = x;
        double r371560 = y;
        double r371561 = r371559 + r371560;
        double r371562 = log(r371561);
        double r371563 = z;
        double r371564 = log(r371563);
        double r371565 = r371562 + r371564;
        double r371566 = t;
        double r371567 = r371565 - r371566;
        double r371568 = a;
        double r371569 = 0.5;
        double r371570 = r371568 - r371569;
        double r371571 = log(r371566);
        double r371572 = r371570 * r371571;
        double r371573 = r371567 + r371572;
        return r371573;
}

double f(double x, double y, double z, double t, double a) {
        double r371574 = x;
        double r371575 = y;
        double r371576 = r371574 + r371575;
        double r371577 = log(r371576);
        double r371578 = z;
        double r371579 = log(r371578);
        double r371580 = r371577 + r371579;
        double r371581 = t;
        double r371582 = a;
        double r371583 = 0.5;
        double r371584 = r371582 - r371583;
        double r371585 = log(r371581);
        double r371586 = r371584 * r371585;
        double r371587 = r371581 - r371586;
        double r371588 = r371580 - r371587;
        return r371588;
}

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

Target

Original0.3
Target0.3
Herbie0.3
\[\log \left(x + y\right) + \left(\left(\log z - t\right) + \left(a - 0.5\right) \cdot \log t\right)\]

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

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

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

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

Reproduce

herbie shell --seed 2020049 
(FPCore (x y z t a)
  :name "Numeric.SpecFunctions:logGammaL from math-functions-0.1.5.2"
  :precision binary64

  :herbie-target
  (+ (log (+ x y)) (+ (- (log z) t) (* (- a 0.5) (log t))))

  (+ (- (+ (log (+ x y)) (log z)) t) (* (- a 0.5) (log t))))