Average Error: 0.1 → 0.1
Time: 18.8s
Precision: 64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[x + \left(\left(y - \log y \cdot \left(0.5 + y\right)\right) - z\right)\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
x + \left(\left(y - \log y \cdot \left(0.5 + y\right)\right) - z\right)
double f(double x, double y, double z) {
        double r290230 = x;
        double r290231 = y;
        double r290232 = 0.5;
        double r290233 = r290231 + r290232;
        double r290234 = log(r290231);
        double r290235 = r290233 * r290234;
        double r290236 = r290230 - r290235;
        double r290237 = r290236 + r290231;
        double r290238 = z;
        double r290239 = r290237 - r290238;
        return r290239;
}

double f(double x, double y, double z) {
        double r290240 = x;
        double r290241 = y;
        double r290242 = log(r290241);
        double r290243 = 0.5;
        double r290244 = r290243 + r290241;
        double r290245 = r290242 * r290244;
        double r290246 = r290241 - r290245;
        double r290247 = z;
        double r290248 = r290246 - r290247;
        double r290249 = r290240 + r290248;
        return r290249;
}

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 *-un-lft-identity0.1

    \[\leadsto \left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + \color{blue}{1 \cdot y}\right) - z\]
  4. Applied *-un-lft-identity0.1

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

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

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

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

Reproduce

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