Average Error: 0.1 → 0.1
Time: 5.6s
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 r367755 = x;
        double r367756 = y;
        double r367757 = 0.5;
        double r367758 = r367756 + r367757;
        double r367759 = log(r367756);
        double r367760 = r367758 * r367759;
        double r367761 = r367755 - r367760;
        double r367762 = r367761 + r367756;
        double r367763 = z;
        double r367764 = r367762 - r367763;
        return r367764;
}

double f(double x, double y, double z) {
        double r367765 = x;
        double r367766 = y;
        double r367767 = 0.5;
        double r367768 = r367766 + r367767;
        double r367769 = log(r367766);
        double r367770 = r367768 * r367769;
        double r367771 = r367770 - r367766;
        double r367772 = z;
        double r367773 = r367771 + r367772;
        double r367774 = r367765 - r367773;
        return r367774;
}

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