\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
\left(3 \cdot x\right) \cdot x + {x}^{3} \cdot \left(-2\right)double f(double x) {
double r535443 = x;
double r535444 = r535443 * r535443;
double r535445 = 3.0;
double r535446 = 2.0;
double r535447 = r535443 * r535446;
double r535448 = r535445 - r535447;
double r535449 = r535444 * r535448;
return r535449;
}
double f(double x) {
double r535450 = 3.0;
double r535451 = x;
double r535452 = r535450 * r535451;
double r535453 = r535452 * r535451;
double r535454 = 3.0;
double r535455 = pow(r535451, r535454);
double r535456 = 2.0;
double r535457 = -r535456;
double r535458 = r535455 * r535457;
double r535459 = r535453 + r535458;
return r535459;
}




Bits error versus x
Results
| Original | 0.2 |
|---|---|
| Target | 0.2 |
| Herbie | 0.1 |
Initial program 0.2
Simplified0.2
Taylor expanded around 0 0.1
Simplified0.2
rmApplied sub-neg0.2
Applied distribute-lft-in0.2
Simplified0.2
Simplified0.1
Final simplification0.1
herbie shell --seed 2019174 +o rules:numerics
(FPCore (x)
:name "Data.Spline.Key:interpolateKeys from smoothie-0.4.0.2"
:herbie-target
(* x (* x (- 3.0 (* x 2.0))))
(* (* x x) (- 3.0 (* x 2.0))))