\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
x \cdot \left(3 \cdot x + \left(-2 \cdot {x}^{2}\right)\right)double f(double x) {
double r814053 = x;
double r814054 = r814053 * r814053;
double r814055 = 3.0;
double r814056 = 2.0;
double r814057 = r814053 * r814056;
double r814058 = r814055 - r814057;
double r814059 = r814054 * r814058;
return r814059;
}
double f(double x) {
double r814060 = x;
double r814061 = 3.0;
double r814062 = r814061 * r814060;
double r814063 = 2.0;
double r814064 = 2.0;
double r814065 = pow(r814060, r814064);
double r814066 = r814063 * r814065;
double r814067 = -r814066;
double r814068 = r814062 + r814067;
double r814069 = r814060 * r814068;
return r814069;
}




Bits error versus x
Results
| Original | 0.2 |
|---|---|
| Target | 0.2 |
| Herbie | 0.2 |
Initial program 0.2
rmApplied pow10.2
Applied pow10.2
Applied pow10.2
Applied pow-prod-down0.2
Applied pow-prod-down0.2
Simplified0.2
rmApplied sub-neg0.2
Applied distribute-lft-in0.2
Simplified0.2
Simplified0.2
Final simplification0.2
herbie shell --seed 2020045 +o rules:numerics
(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))))