\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
x \cdot \frac{x \cdot \left(\left(3 - x \cdot 2\right) \cdot \left(3 + x \cdot 2\right)\right)}{3 + x \cdot 2}double f(double x) {
double r37672454 = x;
double r37672455 = r37672454 * r37672454;
double r37672456 = 3.0;
double r37672457 = 2.0;
double r37672458 = r37672454 * r37672457;
double r37672459 = r37672456 - r37672458;
double r37672460 = r37672455 * r37672459;
return r37672460;
}
double f(double x) {
double r37672461 = x;
double r37672462 = 3.0;
double r37672463 = 2.0;
double r37672464 = r37672461 * r37672463;
double r37672465 = r37672462 - r37672464;
double r37672466 = r37672462 + r37672464;
double r37672467 = r37672465 * r37672466;
double r37672468 = r37672461 * r37672467;
double r37672469 = r37672468 / r37672466;
double r37672470 = r37672461 * r37672469;
return r37672470;
}




Bits error versus x
Results
| Original | 0.2 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 0.2
rmApplied associate-*l*0.2
rmApplied flip--0.2
Applied associate-*r/0.2
Simplified0.2
rmApplied *-commutative0.2
Final simplification0.2
herbie shell --seed 2019172
(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))))