Average Error: 0.1 → 0.1
Time: 3.6s
Precision: binary64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[\left(x + \left(\left(y - y \cdot \log y\right) - \log y \cdot 0.5\right)\right) - z\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(x + \left(\left(y - y \cdot \log y\right) - \log y \cdot 0.5\right)\right) - z
double code(double x, double y, double z) {
	return ((double) (((double) (((double) (x - ((double) (((double) (y + 0.5)) * ((double) log(y)))))) + y)) - z));
}
double code(double x, double y, double z) {
	return ((double) (((double) (x + ((double) (((double) (y - ((double) (y * ((double) log(y)))))) - ((double) (((double) log(y)) * 0.5)))))) - z));
}

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. Using strategy rm
  7. Applied distribute-lft-in0.1

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

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

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

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

Reproduce

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