\left(x \cdot x\right) \cdot \left(3.0 - x \cdot 2.0\right)
\left(\left(3.0 - x \cdot 2.0\right) \cdot x\right) \cdot x
double f(double x) {
double r16669103 = x;
double r16669104 = r16669103 * r16669103;
double r16669105 = 3.0;
double r16669106 = 2.0;
double r16669107 = r16669103 * r16669106;
double r16669108 = r16669105 - r16669107;
double r16669109 = r16669104 * r16669108;
return r16669109;
}
double f(double x) {
double r16669110 = 3.0;
double r16669111 = x;
double r16669112 = 2.0;
double r16669113 = r16669111 * r16669112;
double r16669114 = r16669110 - r16669113;
double r16669115 = r16669114 * r16669111;
double r16669116 = r16669115 * r16669111;
return r16669116;
}




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
rmApplied associate-*l*0.5
Simplified0.2
Final simplification0.2
herbie shell --seed 2019156
(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))))