Average Error: 0.1 → 0.1
Time: 32.6s
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 r436097 = x;
        double r436098 = y;
        double r436099 = 0.5;
        double r436100 = r436098 + r436099;
        double r436101 = log(r436098);
        double r436102 = r436100 * r436101;
        double r436103 = r436097 - r436102;
        double r436104 = r436103 + r436098;
        double r436105 = z;
        double r436106 = r436104 - r436105;
        return r436106;
}

double f(double x, double y, double z) {
        double r436107 = x;
        double r436108 = y;
        double r436109 = 0.5;
        double r436110 = r436108 + r436109;
        double r436111 = log(r436108);
        double r436112 = r436110 * r436111;
        double r436113 = r436107 - r436112;
        double r436114 = r436113 + r436108;
        double r436115 = z;
        double r436116 = r436114 - r436115;
        return r436116;
}

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