\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 r740456 = x;
double r740457 = r740456 * r740456;
double r740458 = 3.0;
double r740459 = 2.0;
double r740460 = r740456 * r740459;
double r740461 = r740458 - r740460;
double r740462 = r740457 * r740461;
return r740462;
}
double f(double x) {
double r740463 = x;
double r740464 = 3.0;
double r740465 = r740463 * r740464;
double r740466 = r740463 * r740465;
double r740467 = 2.0;
double r740468 = 3.0;
double r740469 = pow(r740463, r740468);
double r740470 = r740467 * r740469;
double r740471 = -r740470;
double r740472 = r740466 + r740471;
return r740472;
}




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 2020047
(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))))