\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 r35507168 = x;
double r35507169 = r35507168 * r35507168;
double r35507170 = 3.0;
double r35507171 = 2.0;
double r35507172 = r35507168 * r35507171;
double r35507173 = r35507170 - r35507172;
double r35507174 = r35507169 * r35507173;
return r35507174;
}
double f(double x) {
double r35507175 = x;
double r35507176 = 3.0;
double r35507177 = 2.0;
double r35507178 = r35507175 * r35507177;
double r35507179 = r35507176 - r35507178;
double r35507180 = r35507176 + r35507178;
double r35507181 = r35507179 * r35507180;
double r35507182 = r35507175 * r35507181;
double r35507183 = r35507182 / r35507180;
double r35507184 = r35507175 * r35507183;
return r35507184;
}




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
rmApplied *-commutative0.2
Final simplification0.2
herbie shell --seed 2019172
(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))))