d \cdot 10 + d \cdot 20
d \cdot 30
double f(double d) {
double r6836336 = d;
double r6836337 = 10.0;
double r6836338 = r6836336 * r6836337;
double r6836339 = 20.0;
double r6836340 = r6836336 * r6836339;
double r6836341 = r6836338 + r6836340;
return r6836341;
}
double f(double d) {
double r6836342 = d;
double r6836343 = 30.0;
double r6836344 = r6836342 * r6836343;
return r6836344;
}




Bits error versus d
Results
| Original | 0.3 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 0.3
Simplified0
Final simplification0
herbie shell --seed 2019162 +o rules:numerics
(FPCore (d)
:name "FastMath test1"
:herbie-target
(* d 30)
(+ (* d 10) (* d 20)))