Average Error: 6.5 → 2.0
Time: 4.2s
Precision: binary64
\[\]
\[\]
double code(double x, double y, double z, double t) {
	return ((double) (x + ((double) (((double) (y * ((double) (z - x)))) / t))));
}
double code(double x, double y, double z, double t) {
	return ((double) (x + ((double) (((double) (y / t)) * ((double) (z - x))))));
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus t

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original6.5
Target2.0
Herbie2.0
\[\]

Derivation

  1. Initial program 6.5

    \[\]
  2. Simplified6.2

    \[\leadsto \]
  3. Using strategy rm
  4. Applied clear-num6.3

    \[\leadsto \]
  5. Using strategy rm
  6. Applied associate-/r/6.2

    \[\leadsto \]
  7. Applied associate-*r*2.0

    \[\leadsto \]
  8. Simplified2.0

    \[\leadsto \]
  9. Final simplification2.0

    \[\leadsto \]

Reproduce

herbie shell --seed 2020191 
(FPCore (x y z t)
  :name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
  :precision binary64

  :herbie-target
  (- x (+ (* x (/ y t)) (* (neg z) (/ y t))))

  (+ x (/ (* y (- z x)) t)))