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

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

Original7.2
Target0.4
Herbie0.4
\[\]

Derivation

  1. Initial program 7.2

    \[\]
  2. Using strategy rm
  3. Applied div-sub7.2

    \[\leadsto \]
  4. Simplified2.2

    \[\leadsto \]
  5. Simplified2.2

    \[\leadsto \]
  6. Using strategy rm
  7. Applied *-un-lft-identity2.2

    \[\leadsto \]
  8. Applied associate-/r*2.2

    \[\leadsto \]
  9. Simplified0.4

    \[\leadsto \]
  10. Final simplification0.4

    \[\leadsto \]

Reproduce

herbie shell --seed 2020181 
(FPCore (x y z t)
  :name "Diagrams.Trail:splitAtParam  from diagrams-lib-1.3.0.3, A"
  :precision binary64

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

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