\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 r545803 = x;
double r545804 = r545803 * r545803;
double r545805 = 3.0;
double r545806 = 2.0;
double r545807 = r545803 * r545806;
double r545808 = r545805 - r545807;
double r545809 = r545804 * r545808;
return r545809;
}
double f(double x) {
double r545810 = x;
double r545811 = 3.0;
double r545812 = r545810 * r545811;
double r545813 = r545810 * r545812;
double r545814 = 2.0;
double r545815 = 3.0;
double r545816 = pow(r545810, r545815);
double r545817 = r545814 * r545816;
double r545818 = -r545817;
double r545819 = r545813 + r545818;
return r545819;
}




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