Average Error: 0.1 → 0.1
Time: 5.1s
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 r338944 = x;
        double r338945 = y;
        double r338946 = 0.5;
        double r338947 = r338945 + r338946;
        double r338948 = log(r338945);
        double r338949 = r338947 * r338948;
        double r338950 = r338944 - r338949;
        double r338951 = r338950 + r338945;
        double r338952 = z;
        double r338953 = r338951 - r338952;
        return r338953;
}

double f(double x, double y, double z) {
        double r338954 = x;
        double r338955 = y;
        double r338956 = 0.5;
        double r338957 = r338955 + r338956;
        double r338958 = log(r338955);
        double r338959 = r338957 * r338958;
        double r338960 = r338954 - r338959;
        double r338961 = r338960 + r338955;
        double r338962 = z;
        double r338963 = r338961 - r338962;
        return r338963;
}

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 2020024 +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))