Average Error: 0.1 → 0.1
Time: 692.0ms
Precision: binary64
\[\left(1 + 2 \cdot b\right) + \frac{\left(b \cdot b\right) \cdot 5}{4}\]
\[\left(1 + 2 \cdot b\right) + \frac{\left(b \cdot b\right) \cdot 5}{4}\]
\left(1 + 2 \cdot b\right) + \frac{\left(b \cdot b\right) \cdot 5}{4}
\left(1 + 2 \cdot b\right) + \frac{\left(b \cdot b\right) \cdot 5}{4}
double code(double b) {
	return ((double) (((double) (1.0 + ((double) (2.0 * b)))) + ((double) (((double) (((double) (b * b)) * 5.0)) / 4.0))));
}
double code(double b) {
	return ((double) (((double) (1.0 + ((double) (2.0 * b)))) + ((double) (((double) (((double) (b * b)) * 5.0)) / 4.0))));
}

Error

Bits error versus b

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[\left(1 + 2 \cdot b\right) + \frac{\left(b \cdot b\right) \cdot 5}{4}\]
  2. Final simplification0.1

    \[\leadsto \left(1 + 2 \cdot b\right) + \frac{\left(b \cdot b\right) \cdot 5}{4}\]

Reproduce

herbie shell --seed 2020153 
(FPCore (b)
  :name "(+ (+ 1.0 (* 2.0 b)) (/ (* (* b b) 5.0) 4.0))"
  :precision binary64
  (+ (+ 1.0 (* 2.0 b)) (/ (* (* b b) 5.0) 4.0)))