\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 r869937 = x;
double r869938 = r869937 * r869937;
double r869939 = 3.0;
double r869940 = 2.0;
double r869941 = r869937 * r869940;
double r869942 = r869939 - r869941;
double r869943 = r869938 * r869942;
return r869943;
}
double f(double x) {
double r869944 = x;
double r869945 = 3.0;
double r869946 = r869944 * r869945;
double r869947 = r869944 * r869946;
double r869948 = 2.0;
double r869949 = 3.0;
double r869950 = pow(r869944, r869949);
double r869951 = r869948 * r869950;
double r869952 = -r869951;
double r869953 = r869947 + r869952;
return r869953;
}




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