Average Error: 0.1 → 0.1
Time: 20.4s
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 r12916935 = x;
        double r12916936 = y;
        double r12916937 = 0.5;
        double r12916938 = r12916936 + r12916937;
        double r12916939 = log(r12916936);
        double r12916940 = r12916938 * r12916939;
        double r12916941 = r12916935 - r12916940;
        double r12916942 = r12916941 + r12916936;
        double r12916943 = z;
        double r12916944 = r12916942 - r12916943;
        return r12916944;
}

double f(double x, double y, double z) {
        double r12916945 = x;
        double r12916946 = z;
        double r12916947 = y;
        double r12916948 = 0.5;
        double r12916949 = r12916947 + r12916948;
        double r12916950 = log(r12916947);
        double r12916951 = r12916949 * r12916950;
        double r12916952 = r12916951 - r12916947;
        double r12916953 = r12916946 + r12916952;
        double r12916954 = r12916945 - r12916953;
        return r12916954;
}

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