\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
\frac{x \cdot x}{\frac{1}{3 - x \cdot 2}}double f(double x) {
double r33652013 = x;
double r33652014 = r33652013 * r33652013;
double r33652015 = 3.0;
double r33652016 = 2.0;
double r33652017 = r33652013 * r33652016;
double r33652018 = r33652015 - r33652017;
double r33652019 = r33652014 * r33652018;
return r33652019;
}
double f(double x) {
double r33652020 = x;
double r33652021 = r33652020 * r33652020;
double r33652022 = 1.0;
double r33652023 = 3.0;
double r33652024 = 2.0;
double r33652025 = r33652020 * r33652024;
double r33652026 = r33652023 - r33652025;
double r33652027 = r33652022 / r33652026;
double r33652028 = r33652021 / r33652027;
return r33652028;
}




Bits error versus x
Results
| Original | 0.2 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 0.2
rmApplied associate-*l*0.2
rmApplied flip--0.2
Applied associate-*r/0.2
rmApplied *-un-lft-identity0.2
Applied associate-*l*0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2019172 +o rules:numerics
(FPCore (x)
:name "Data.Spline.Key:interpolateKeys from smoothie-0.4.0.2"
:herbie-target
(* x (* x (- 3.0 (* x 2.0))))
(* (* x x) (- 3.0 (* x 2.0))))