\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 r520374 = x;
double r520375 = r520374 * r520374;
double r520376 = 3.0;
double r520377 = 2.0;
double r520378 = r520374 * r520377;
double r520379 = r520376 - r520378;
double r520380 = r520375 * r520379;
return r520380;
}
double f(double x) {
double r520381 = x;
double r520382 = 3.0;
double r520383 = r520381 * r520382;
double r520384 = r520381 * r520383;
double r520385 = 2.0;
double r520386 = 3.0;
double r520387 = pow(r520381, r520386);
double r520388 = r520385 * r520387;
double r520389 = -r520388;
double r520390 = r520384 + r520389;
return r520390;
}




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