\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
{x}^{2} \cdot \left(3 - x \cdot 2\right)double f(double x) {
double r549308 = x;
double r549309 = r549308 * r549308;
double r549310 = 3.0;
double r549311 = 2.0;
double r549312 = r549308 * r549311;
double r549313 = r549310 - r549312;
double r549314 = r549309 * r549313;
return r549314;
}
double f(double x) {
double r549315 = x;
double r549316 = 2.0;
double r549317 = pow(r549315, r549316);
double r549318 = 3.0;
double r549319 = 2.0;
double r549320 = r549315 * r549319;
double r549321 = r549318 - r549320;
double r549322 = r549317 * r549321;
return r549322;
}




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
Taylor expanded around 0 0.1
Final simplification0.2
herbie shell --seed 1978988140
(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))))