\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
\left(x \cdot x\right) \cdot 3 + \left(-2 \cdot {x}^{3}\right)double f(double x) {
double r893591 = x;
double r893592 = r893591 * r893591;
double r893593 = 3.0;
double r893594 = 2.0;
double r893595 = r893591 * r893594;
double r893596 = r893593 - r893595;
double r893597 = r893592 * r893596;
return r893597;
}
double f(double x) {
double r893598 = x;
double r893599 = r893598 * r893598;
double r893600 = 3.0;
double r893601 = r893599 * r893600;
double r893602 = 2.0;
double r893603 = 3.0;
double r893604 = pow(r893598, r893603);
double r893605 = r893602 * r893604;
double r893606 = -r893605;
double r893607 = r893601 + r893606;
return r893607;
}




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
Final simplification0.1
herbie shell --seed 2020046
(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))))