\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 r893008 = x;
double r893009 = r893008 * r893008;
double r893010 = 3.0;
double r893011 = 2.0;
double r893012 = r893008 * r893011;
double r893013 = r893010 - r893012;
double r893014 = r893009 * r893013;
return r893014;
}
double f(double x) {
double r893015 = x;
double r893016 = 3.0;
double r893017 = r893015 * r893016;
double r893018 = r893015 * r893017;
double r893019 = 2.0;
double r893020 = 3.0;
double r893021 = pow(r893015, r893020);
double r893022 = r893019 * r893021;
double r893023 = -r893022;
double r893024 = r893018 + r893023;
return r893024;
}




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