Average Error: 0.0 → 0.0
Time: 2.7s
Precision: binary64
\[\]
\[\]
double code(double d1, double d2, double d3) {
	return ((double) (((double) (((double) (d1 * d2)) + ((double) (((double) (d3 + 5.0)) * d1)))) + ((double) (d1 * 32.0))));
}
double code(double d1, double d2, double d3) {
	return ((double) (((double) (d1 * d2)) + ((double) (d1 * ((double) (d3 + ((double) (5.0 + 32.0))))))));
}

Error

Bits error versus d1

Bits error versus d2

Bits error versus d3

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.0
Target0.0
Herbie0.0
\[\]

Derivation

  1. Initial program 0.0

    \[\]
  2. Simplified0.0

    \[\leadsto \]
  3. Using strategy rm
  4. Applied distribute-lft-in0.0

    \[\leadsto \]
  5. Final simplification0.0

    \[\leadsto \]

Reproduce

herbie shell --seed 2020191 
(FPCore (d1 d2 d3)
  :name "FastMath dist3"
  :precision binary64

  :herbie-target
  (* d1 (+ (+ 37.0 d3) d2))

  (+ (+ (* d1 d2) (* (+ d3 5.0) d1)) (* d1 32.0)))