Average Error: 11.7 → 2.1
Time: 4.1s
Precision: binary64
\[\]
\[\]
double code(double x, double y, double z, double t) {
	return ((double) (((double) (x * ((double) (y - z)))) / ((double) (t - z))));
}
double code(double x, double y, double z, double t) {
	return ((double) (x / ((double) (((double) (t - z)) / ((double) (y - z))))));
}

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

Original11.7
Target2.1
Herbie2.1
\[\]

Derivation

  1. Initial program 11.7

    \[\]
  2. Simplified2.1

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

    \[\leadsto \]
  5. Using strategy rm
  6. Applied un-div-inv2.1

    \[\leadsto \]
  7. Final simplification2.1

    \[\leadsto \]

Reproduce

herbie shell --seed 2020180 
(FPCore (x y z t)
  :name "Graphics.Rendering.Chart.Plot.AreaSpots:renderAreaSpots4D from Chart-1.5.3"
  :precision binary64

  :herbie-target
  (/ x (/ (- t z) (- y z)))

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