Average Error: 0.0 → 0.0
Time: 22.5s
Precision: binary64
\[\left(a \cdot c + b \cdot c\right) + d \cdot 100\]
\[d \cdot 100 + c \cdot \left(a + b\right)\]
\left(a \cdot c + b \cdot c\right) + d \cdot 100
d \cdot 100 + c \cdot \left(a + b\right)
double code(double a, double c, double b, double d) {
	return ((double) (((double) (((double) (a * c)) + ((double) (b * c)))) + ((double) (d * 100.0))));
}
double code(double a, double c, double b, double d) {
	return ((double) (((double) (d * 100.0)) + ((double) (c * ((double) (a + b))))));
}

Error

Bits error versus a

Bits error versus c

Bits error versus b

Bits error versus d

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[\left(a \cdot c + b \cdot c\right) + d \cdot 100\]
  2. Simplified0.0

    \[\leadsto \color{blue}{d \cdot 100 + c \cdot \left(a + b\right)}\]
  3. Final simplification0.0

    \[\leadsto d \cdot 100 + c \cdot \left(a + b\right)\]

Reproduce

herbie shell --seed 2020153 
(FPCore (a c b d)
  :name "(+ (+ (* a c) (* b c)) (* d 100))"
  :precision binary64
  (+ (+ (* a c) (* b c)) (* d 100.0)))