Average Error: 0.1 → 0.1
Time: 8.5s
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 r468944 = x;
        double r468945 = y;
        double r468946 = 0.5;
        double r468947 = r468945 + r468946;
        double r468948 = log(r468945);
        double r468949 = r468947 * r468948;
        double r468950 = r468944 - r468949;
        double r468951 = r468950 + r468945;
        double r468952 = z;
        double r468953 = r468951 - r468952;
        return r468953;
}

double f(double x, double y, double z) {
        double r468954 = x;
        double r468955 = y;
        double r468956 = 0.5;
        double r468957 = r468955 + r468956;
        double r468958 = log(r468955);
        double r468959 = r468957 * r468958;
        double r468960 = r468954 - r468959;
        double r468961 = r468960 + r468955;
        double r468962 = z;
        double r468963 = r468961 - r468962;
        return r468963;
}

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