Average Error: 0.1 → 0.1
Time: 5.5s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[x - \left(\left(\left(y + 0.5\right) \cdot \log y - y\right) + z\right)\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
x - \left(\left(\left(y + 0.5\right) \cdot \log y - y\right) + z\right)
double f(double x, double y, double z) {
        double r319738 = x;
        double r319739 = y;
        double r319740 = 0.5;
        double r319741 = r319739 + r319740;
        double r319742 = log(r319739);
        double r319743 = r319741 * r319742;
        double r319744 = r319738 - r319743;
        double r319745 = r319744 + r319739;
        double r319746 = z;
        double r319747 = r319745 - r319746;
        return r319747;
}

double f(double x, double y, double z) {
        double r319748 = x;
        double r319749 = y;
        double r319750 = 0.5;
        double r319751 = r319749 + r319750;
        double r319752 = log(r319749);
        double r319753 = r319751 * r319752;
        double r319754 = r319753 - r319749;
        double r319755 = z;
        double r319756 = r319754 + r319755;
        double r319757 = r319748 - r319756;
        return r319757;
}

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(\left(\left(y + 0.5\right) \cdot \log y - y\right) + z\right)\]

Reproduce

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