\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
double f(double x) {
double r537390 = x;
double r537391 = r537390 * r537390;
double r537392 = 3.0;
double r537393 = 2.0;
double r537394 = r537390 * r537393;
double r537395 = r537392 - r537394;
double r537396 = r537391 * r537395;
return r537396;
}
double f(double x) {
double r537397 = x;
double r537398 = r537397 * r537397;
double r537399 = 3.0;
double r537400 = 2.0;
double r537401 = r537397 * r537400;
double r537402 = r537399 - r537401;
double r537403 = r537398 * r537402;
return r537403;
}




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