Average Error: 0.1 → 0.1
Time: 6.2s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[x - \left(\left(y + 0.5\right) \cdot \log y - \left(y - z\right)\right)\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
x - \left(\left(y + 0.5\right) \cdot \log y - \left(y - z\right)\right)
double f(double x, double y, double z) {
        double r457579 = x;
        double r457580 = y;
        double r457581 = 0.5;
        double r457582 = r457580 + r457581;
        double r457583 = log(r457580);
        double r457584 = r457582 * r457583;
        double r457585 = r457579 - r457584;
        double r457586 = r457585 + r457580;
        double r457587 = z;
        double r457588 = r457586 - r457587;
        return r457588;
}

double f(double x, double y, double z) {
        double r457589 = x;
        double r457590 = y;
        double r457591 = 0.5;
        double r457592 = r457590 + r457591;
        double r457593 = log(r457590);
        double r457594 = r457592 * r457593;
        double r457595 = z;
        double r457596 = r457590 - r457595;
        double r457597 = r457594 - r457596;
        double r457598 = r457589 - r457597;
        return r457598;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

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

Derivation

  1. Initial program 0.1

    \[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
  2. Using strategy rm
  3. Applied associate--l+0.1

    \[\leadsto \color{blue}{\left(x - \left(y + 0.5\right) \cdot \log y\right) + \left(y - z\right)}\]
  4. Using strategy rm
  5. Applied associate-+l-0.1

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

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

Reproduce

herbie shell --seed 2020035 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:stirlingError from math-functions-0.1.5.2"
  :precision binary64

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

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