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

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

Original3.7
Target1.7
Herbie1.6
\[\]

Derivation

  1. Initial program 3.7

    \[\]
  2. Using strategy rm
  3. Applied clear-num3.7

    \[\leadsto \]
  4. Simplified1.6

    \[\leadsto \]
  5. Using strategy rm
  6. Applied clear-num1.6

    \[\leadsto \]
  7. Simplified1.6

    \[\leadsto \]
  8. Final simplification1.6

    \[\leadsto \]

Reproduce

herbie shell --seed 2020192 
(FPCore (x y z t)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, H"
  :precision binary64

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

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