\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
3 \cdot {x}^{2} - 2 \cdot {x}^{3}double f(double x) {
double r794557 = x;
double r794558 = r794557 * r794557;
double r794559 = 3.0;
double r794560 = 2.0;
double r794561 = r794557 * r794560;
double r794562 = r794559 - r794561;
double r794563 = r794558 * r794562;
return r794563;
}
double f(double x) {
double r794564 = 3.0;
double r794565 = x;
double r794566 = 2.0;
double r794567 = pow(r794565, r794566);
double r794568 = r794564 * r794567;
double r794569 = 2.0;
double r794570 = 3.0;
double r794571 = pow(r794565, r794570);
double r794572 = r794569 * r794571;
double r794573 = r794568 - r794572;
return r794573;
}




Bits error versus x
Results
| Original | 0.2 |
|---|---|
| Target | 0.2 |
| Herbie | 0.1 |
Initial program 0.2
rmApplied associate-*l*0.2
rmApplied flip--0.2
Applied associate-*r/0.2
Taylor expanded around 0 0.1
Final simplification0.1
herbie shell --seed 2020064
(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))))