\left(x \cdot x\right) \cdot \left(3.0 - x \cdot 2.0\right)
x \cdot \left(x \cdot 3.0 - \left(2.0 \cdot x\right) \cdot x\right)
double f(double x) {
double r15696783 = x;
double r15696784 = r15696783 * r15696783;
double r15696785 = 3.0;
double r15696786 = 2.0;
double r15696787 = r15696783 * r15696786;
double r15696788 = r15696785 - r15696787;
double r15696789 = r15696784 * r15696788;
return r15696789;
}
double f(double x) {
double r15696790 = x;
double r15696791 = 3.0;
double r15696792 = r15696790 * r15696791;
double r15696793 = 2.0;
double r15696794 = r15696793 * r15696790;
double r15696795 = r15696794 * r15696790;
double r15696796 = r15696792 - r15696795;
double r15696797 = r15696790 * r15696796;
return r15696797;
}




Bits error versus x
Results
| Original | 0.2 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 0.2
rmApplied associate-*l*0.2
rmApplied add-cube-cbrt0.5
Applied associate-*r*0.5
Taylor expanded around 0 0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2019156 +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))))