Average Error: 0.1 → 0.1
Time: 16.9s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[\left(x - \left(\left(y + 0.5\right) \cdot \log y - y\right)\right) - z\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(x - \left(\left(y + 0.5\right) \cdot \log y - y\right)\right) - z
double f(double x, double y, double z) {
        double r23874429 = x;
        double r23874430 = y;
        double r23874431 = 0.5;
        double r23874432 = r23874430 + r23874431;
        double r23874433 = log(r23874430);
        double r23874434 = r23874432 * r23874433;
        double r23874435 = r23874429 - r23874434;
        double r23874436 = r23874435 + r23874430;
        double r23874437 = z;
        double r23874438 = r23874436 - r23874437;
        return r23874438;
}

double f(double x, double y, double z) {
        double r23874439 = x;
        double r23874440 = y;
        double r23874441 = 0.5;
        double r23874442 = r23874440 + r23874441;
        double r23874443 = log(r23874440);
        double r23874444 = r23874442 * r23874443;
        double r23874445 = r23874444 - r23874440;
        double r23874446 = r23874439 - r23874445;
        double r23874447 = z;
        double r23874448 = r23874446 - r23874447;
        return r23874448;
}

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. Final simplification0.1

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

Reproduce

herbie shell --seed 2019174 
(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))