Average Error: 0.1 → 0.1
Time: 56.2s
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 r328956 = x;
        double r328957 = y;
        double r328958 = 0.5;
        double r328959 = r328957 + r328958;
        double r328960 = log(r328957);
        double r328961 = r328959 * r328960;
        double r328962 = r328956 - r328961;
        double r328963 = r328962 + r328957;
        double r328964 = z;
        double r328965 = r328963 - r328964;
        return r328965;
}

double f(double x, double y, double z) {
        double r328966 = x;
        double r328967 = y;
        double r328968 = 0.5;
        double r328969 = r328967 + r328968;
        double r328970 = log(r328967);
        double r328971 = r328969 * r328970;
        double r328972 = r328966 - r328971;
        double r328973 = r328972 + r328967;
        double r328974 = z;
        double r328975 = r328973 - r328974;
        return r328975;
}

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