Average Error: 5.9 → 0.1
Time: 3.5s
Precision: binary64
\[\]
\[\]
double code(double x, double y, double z) {
	return ((double) (x + ((double) (((double) (y * y)) / z))));
}
double code(double x, double y, double z) {
	return ((double) (x + ((double) (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

Original5.9
Target0.1
Herbie0.1
\[\]

Derivation

  1. Initial program 5.9

    \[\]
  2. Simplified0.1

    \[\leadsto \]
  3. Final simplification0.1

    \[\leadsto \]

Reproduce

herbie shell --seed 2020191 
(FPCore (x y z)
  :name "Crypto.Random.Test:calculate from crypto-random-0.0.9"
  :precision binary64

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

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