x \cdot \left(x \cdot x\right) + x \cdot x
\mathsf{fma}\left(x, x, {x}^{3}\right)double f(double x) {
double r48900 = x;
double r48901 = r48900 * r48900;
double r48902 = r48900 * r48901;
double r48903 = r48902 + r48901;
return r48903;
}
double f(double x) {
double r48904 = x;
double r48905 = 3.0;
double r48906 = pow(r48904, r48905);
double r48907 = fma(r48904, r48904, r48906);
return r48907;
}




Bits error versus x
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019194 +o rules:numerics
(FPCore (x)
:name "Expression 3, p15"
:pre (<= 0.0 x 2.0)
:herbie-target
(* (* (+ 1.0 x) x) x)
(+ (* x (* x x)) (* x x)))