\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
x \cdot \left(x \cdot 3\right) - 2 \cdot {x}^{3}double f(double x) {
double r607416 = x;
double r607417 = r607416 * r607416;
double r607418 = 3.0;
double r607419 = 2.0;
double r607420 = r607416 * r607419;
double r607421 = r607418 - r607420;
double r607422 = r607417 * r607421;
return r607422;
}
double f(double x) {
double r607423 = x;
double r607424 = 3.0;
double r607425 = r607423 * r607424;
double r607426 = r607423 * r607425;
double r607427 = 2.0;
double r607428 = 3.0;
double r607429 = pow(r607423, r607428);
double r607430 = r607427 * r607429;
double r607431 = r607426 - r607430;
return r607431;
}




Bits error versus x
Results
| Original | 0.2 |
|---|---|
| Target | 0.2 |
| Herbie | 0.1 |
Initial program 0.2
Simplified0.2
rmApplied associate-*r*0.2
Simplified0.2
Taylor expanded around 0 0.1
Simplified0.1
rmApplied pow10.1
Applied pow10.1
Applied pow10.1
Applied pow-prod-down0.1
Applied pow-prod-down0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2019194
(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))))