\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 r800982 = x;
double r800983 = r800982 * r800982;
double r800984 = 3.0;
double r800985 = 2.0;
double r800986 = r800982 * r800985;
double r800987 = r800984 - r800986;
double r800988 = r800983 * r800987;
return r800988;
}
double f(double x) {
double r800989 = x;
double r800990 = 3.0;
double r800991 = r800989 * r800990;
double r800992 = r800989 * r800991;
double r800993 = 2.0;
double r800994 = 3.0;
double r800995 = pow(r800989, r800994);
double r800996 = r800993 * r800995;
double r800997 = -r800996;
double r800998 = r800992 + r800997;
return r800998;
}




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