Average Error: 0.1 → 0.1
Time: 4.0s
Precision: binary64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[x + \left(y - \left(\left(y + 0.5\right) \cdot \log y + z\right)\right)\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
x + \left(y - \left(\left(y + 0.5\right) \cdot \log y + z\right)\right)
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) (x + ((double) (y - ((double) (((double) (((double) (y + 0.5)) * ((double) log(y)))) + 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. Simplified0.1

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

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

Reproduce

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