double code(double x) {
return ((double) (((double) (x * 2.0)) * x));
}
double code(double x) {
return ((double) (x * ((double) (x * 2.0))));
}




Bits error versus x
Results
| Original | 0 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 0
Final simplification0
herbie shell --seed 2020191
(FPCore (x)
:name "Numeric.Log:$cexpm1 from log-domain-0.10.2.1, A"
:precision binary64
:herbie-target
(* (* 2.0 x) x)
(* (* x 2.0) x))