\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 r34893475 = x;
double r34893476 = r34893475 * r34893475;
double r34893477 = 3.0;
double r34893478 = 2.0;
double r34893479 = r34893475 * r34893478;
double r34893480 = r34893477 - r34893479;
double r34893481 = r34893476 * r34893480;
return r34893481;
}
double f(double x) {
double r34893482 = x;
double r34893483 = r34893482 * r34893482;
double r34893484 = 1.0;
double r34893485 = 3.0;
double r34893486 = 2.0;
double r34893487 = r34893482 * r34893486;
double r34893488 = r34893485 - r34893487;
double r34893489 = r34893484 / r34893488;
double r34893490 = r34893483 / r34893489;
return r34893490;
}




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