Average Error: 0.1 → 0.1
Time: 21.9s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[x - \left(z + \left(\left(y + 0.5\right) \cdot \log y - y\right)\right)\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
x - \left(z + \left(\left(y + 0.5\right) \cdot \log y - y\right)\right)
double f(double x, double y, double z) {
        double r19429398 = x;
        double r19429399 = y;
        double r19429400 = 0.5;
        double r19429401 = r19429399 + r19429400;
        double r19429402 = log(r19429399);
        double r19429403 = r19429401 * r19429402;
        double r19429404 = r19429398 - r19429403;
        double r19429405 = r19429404 + r19429399;
        double r19429406 = z;
        double r19429407 = r19429405 - r19429406;
        return r19429407;
}

double f(double x, double y, double z) {
        double r19429408 = x;
        double r19429409 = z;
        double r19429410 = y;
        double r19429411 = 0.5;
        double r19429412 = r19429410 + r19429411;
        double r19429413 = log(r19429410);
        double r19429414 = r19429412 * r19429413;
        double r19429415 = r19429414 - r19429410;
        double r19429416 = r19429409 + r19429415;
        double r19429417 = r19429408 - r19429416;
        return r19429417;
}

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. Using strategy rm
  3. Applied associate-+l-0.1

    \[\leadsto \color{blue}{\left(x - \left(\left(y + 0.5\right) \cdot \log y - y\right)\right)} - z\]
  4. Applied associate--l-0.1

    \[\leadsto \color{blue}{x - \left(\left(\left(y + 0.5\right) \cdot \log y - y\right) + z\right)}\]
  5. Final simplification0.1

    \[\leadsto x - \left(z + \left(\left(y + 0.5\right) \cdot \log y - y\right)\right)\]

Reproduce

herbie shell --seed 2019158 
(FPCore (x y z)
  :name "Numeric.SpecFunctions:stirlingError from math-functions-0.1.5.2"

  :herbie-target
  (- (- (+ y x) z) (* (+ y 0.5) (log y)))

  (- (+ (- x (* (+ y 0.5) (log y))) y) z))