\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 r966267 = x;
double r966268 = r966267 * r966267;
double r966269 = 3.0;
double r966270 = 2.0;
double r966271 = r966267 * r966270;
double r966272 = r966269 - r966271;
double r966273 = r966268 * r966272;
return r966273;
}
double f(double x) {
double r966274 = x;
double r966275 = r966274 * r966274;
double r966276 = 3.0;
double r966277 = r966275 * r966276;
double r966278 = 2.0;
double r966279 = 3.0;
double r966280 = pow(r966274, r966279);
double r966281 = r966278 * r966280;
double r966282 = -r966281;
double r966283 = r966277 + r966282;
return r966283;
}




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