\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
x \cdot \left(x \cdot 3\right) + \left(-2 \cdot {x}^{3}\right)double f(double x) {
double r757359 = x;
double r757360 = r757359 * r757359;
double r757361 = 3.0;
double r757362 = 2.0;
double r757363 = r757359 * r757362;
double r757364 = r757361 - r757363;
double r757365 = r757360 * r757364;
return r757365;
}
double f(double x) {
double r757366 = x;
double r757367 = 3.0;
double r757368 = r757366 * r757367;
double r757369 = r757366 * r757368;
double r757370 = 2.0;
double r757371 = 3.0;
double r757372 = pow(r757366, r757371);
double r757373 = r757370 * r757372;
double r757374 = -r757373;
double r757375 = r757369 + r757374;
return r757375;
}




Bits error versus x
Results
| Original | 0.2 |
|---|---|
| Target | 0.2 |
| Herbie | 0.1 |
Initial program 0.2
rmApplied sub-neg0.2
Applied distribute-lft-in0.2
Simplified0.1
rmApplied associate-*l*0.1
Final simplification0.1
herbie shell --seed 2019356
(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))))