Average Error: 0.1 → 0.1
Time: 30.0s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
double f(double x, double y, double z) {
        double r460668 = x;
        double r460669 = y;
        double r460670 = 0.5;
        double r460671 = r460669 + r460670;
        double r460672 = log(r460669);
        double r460673 = r460671 * r460672;
        double r460674 = r460668 - r460673;
        double r460675 = r460674 + r460669;
        double r460676 = z;
        double r460677 = r460675 - r460676;
        return r460677;
}

double f(double x, double y, double z) {
        double r460678 = x;
        double r460679 = y;
        double r460680 = 0.5;
        double r460681 = r460679 + r460680;
        double r460682 = log(r460679);
        double r460683 = r460681 * r460682;
        double r460684 = r460678 - r460683;
        double r460685 = r460684 + r460679;
        double r460686 = z;
        double r460687 = r460685 - r460686;
        return r460687;
}

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. Final simplification0.1

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

Reproduce

herbie shell --seed 2020042 +o rules:numerics
(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))