\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
x \cdot \frac{\left(x \cdot \left(3 - x \cdot 2\right)\right) \cdot \mathsf{fma}\left(2, x, 3\right)}{3 + x \cdot 2}double f(double x) {
double r653693 = x;
double r653694 = r653693 * r653693;
double r653695 = 3.0;
double r653696 = 2.0;
double r653697 = r653693 * r653696;
double r653698 = r653695 - r653697;
double r653699 = r653694 * r653698;
return r653699;
}
double f(double x) {
double r653700 = x;
double r653701 = 3.0;
double r653702 = 2.0;
double r653703 = r653700 * r653702;
double r653704 = r653701 - r653703;
double r653705 = r653700 * r653704;
double r653706 = fma(r653702, r653700, r653701);
double r653707 = r653705 * r653706;
double r653708 = r653701 + r653703;
double r653709 = r653707 / r653708;
double r653710 = r653700 * r653709;
return r653710;
}




Bits error versus x
| Original | 0.2 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 0.2
rmApplied associate-*l*0.2
rmApplied flip--0.2
Applied associate-*r/0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2020034 +o rules:numerics
(FPCore (x)
:name "Data.Spline.Key:interpolateKeys from smoothie-0.4.0.2"
:precision binary64
:herbie-target
(* x (* x (- 3 (* x 2))))
(* (* x x) (- 3 (* x 2))))