\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
\left(x \cdot x\right) \cdot 3 + \left(-2 \cdot {x}^{3}\right)double f(double x) {
double r845144 = x;
double r845145 = r845144 * r845144;
double r845146 = 3.0;
double r845147 = 2.0;
double r845148 = r845144 * r845147;
double r845149 = r845146 - r845148;
double r845150 = r845145 * r845149;
return r845150;
}
double f(double x) {
double r845151 = x;
double r845152 = r845151 * r845151;
double r845153 = 3.0;
double r845154 = r845152 * r845153;
double r845155 = 2.0;
double r845156 = 3.0;
double r845157 = pow(r845151, r845156);
double r845158 = r845155 * r845157;
double r845159 = -r845158;
double r845160 = r845154 + r845159;
return r845160;
}




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
Final simplification0.1
herbie shell --seed 2020027
(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))))