Average Error: 0.1 → 0.1
Time: 53.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 r251212 = x;
        double r251213 = y;
        double r251214 = 0.5;
        double r251215 = r251213 + r251214;
        double r251216 = log(r251213);
        double r251217 = r251215 * r251216;
        double r251218 = r251212 - r251217;
        double r251219 = r251218 + r251213;
        double r251220 = z;
        double r251221 = r251219 - r251220;
        return r251221;
}

double f(double x, double y, double z) {
        double r251222 = x;
        double r251223 = y;
        double r251224 = 0.5;
        double r251225 = r251223 + r251224;
        double r251226 = log(r251223);
        double r251227 = r251225 * r251226;
        double r251228 = r251222 - r251227;
        double r251229 = r251228 + r251223;
        double r251230 = z;
        double r251231 = r251229 - r251230;
        return r251231;
}

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