\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
x \cdot \frac{x \cdot \left(\left(3 + x \cdot 2\right) \cdot \left(3 - x \cdot 2\right)\right)}{3 + x \cdot 2}double f(double x) {
double r35830825 = x;
double r35830826 = r35830825 * r35830825;
double r35830827 = 3.0;
double r35830828 = 2.0;
double r35830829 = r35830825 * r35830828;
double r35830830 = r35830827 - r35830829;
double r35830831 = r35830826 * r35830830;
return r35830831;
}
double f(double x) {
double r35830832 = x;
double r35830833 = 3.0;
double r35830834 = 2.0;
double r35830835 = r35830832 * r35830834;
double r35830836 = r35830833 + r35830835;
double r35830837 = r35830833 - r35830835;
double r35830838 = r35830836 * r35830837;
double r35830839 = r35830832 * r35830838;
double r35830840 = r35830839 / r35830836;
double r35830841 = r35830832 * r35830840;
return r35830841;
}




Bits error versus x
Results
| 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 2019192 +o rules:numerics
(FPCore (x)
:name "Data.Spline.Key:interpolateKeys from smoothie-0.4.0.2"
:herbie-target
(* x (* x (- 3.0 (* x 2.0))))
(* (* x x) (- 3.0 (* x 2.0))))