\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 r620338 = x;
double r620339 = r620338 * r620338;
double r620340 = 3.0;
double r620341 = 2.0;
double r620342 = r620338 * r620341;
double r620343 = r620340 - r620342;
double r620344 = r620339 * r620343;
return r620344;
}
double f(double x) {
double r620345 = x;
double r620346 = 3.0;
double r620347 = r620345 * r620346;
double r620348 = r620345 * r620347;
double r620349 = 2.0;
double r620350 = 3.0;
double r620351 = pow(r620345, r620350);
double r620352 = r620349 * r620351;
double r620353 = -r620352;
double r620354 = r620348 + r620353;
return r620354;
}




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