Average Error: 0.1 → 0.1
Time: 3.2s
Precision: binary64
\[\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z\]
\[\left(x - \left(y + 0.5\right) \cdot \log y\right) + \left(y - z\right)\]
\left(\left(x - \left(y + 0.5\right) \cdot \log y\right) + y\right) - z
\left(x - \left(y + 0.5\right) \cdot \log y\right) + \left(y - z\right)
(FPCore (x y z) :precision binary64 (- (+ (- x (* (+ y 0.5) (log y))) y) z))
(FPCore (x y z) :precision binary64 (+ (- x (* (+ y 0.5) (log y))) (- y 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 + 0.5)) * ((double) log(y)))))) + ((double) (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. Using strategy rm
  3. Applied associate--l+_binary640.1

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

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

Reproduce

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