Average Error: 0.1 → 0.1
Time: 19.5s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[\left(x + \left(y - \log y \cdot \left(y + 0.5\right)\right)\right) - z\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(x + \left(y - \log y \cdot \left(y + 0.5\right)\right)\right) - z
double f(double x, double y, double z) {
        double r20265056 = x;
        double r20265057 = y;
        double r20265058 = 0.5;
        double r20265059 = r20265057 + r20265058;
        double r20265060 = log(r20265057);
        double r20265061 = r20265059 * r20265060;
        double r20265062 = r20265056 - r20265061;
        double r20265063 = r20265062 + r20265057;
        double r20265064 = z;
        double r20265065 = r20265063 - r20265064;
        return r20265065;
}

double f(double x, double y, double z) {
        double r20265066 = x;
        double r20265067 = y;
        double r20265068 = log(r20265067);
        double r20265069 = 0.5;
        double r20265070 = r20265067 + r20265069;
        double r20265071 = r20265068 * r20265070;
        double r20265072 = r20265067 - r20265071;
        double r20265073 = r20265066 + r20265072;
        double r20265074 = z;
        double r20265075 = r20265073 - r20265074;
        return r20265075;
}

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 sub-neg0.1

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

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

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

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

Reproduce

herbie shell --seed 2019174 +o rules:numerics
(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))