\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 r763826 = x;
double r763827 = r763826 * r763826;
double r763828 = 3.0;
double r763829 = 2.0;
double r763830 = r763826 * r763829;
double r763831 = r763828 - r763830;
double r763832 = r763827 * r763831;
return r763832;
}
double f(double x) {
double r763833 = x;
double r763834 = 3.0;
double r763835 = r763833 * r763834;
double r763836 = r763833 * r763835;
double r763837 = 2.0;
double r763838 = 3.0;
double r763839 = pow(r763833, r763838);
double r763840 = r763837 * r763839;
double r763841 = -r763840;
double r763842 = r763836 + r763841;
return r763842;
}




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