\left(x \cdot x\right) \cdot \left(3 - x \cdot 2\right)
\left(3 \cdot x\right) \cdot {x}^{\left(\frac{2}{2}\right)} + \left(-2 \cdot {x}^{3}\right)double f(double x) {
double r817495 = x;
double r817496 = r817495 * r817495;
double r817497 = 3.0;
double r817498 = 2.0;
double r817499 = r817495 * r817498;
double r817500 = r817497 - r817499;
double r817501 = r817496 * r817500;
return r817501;
}
double f(double x) {
double r817502 = 3.0;
double r817503 = x;
double r817504 = r817502 * r817503;
double r817505 = 2.0;
double r817506 = r817505 / r817505;
double r817507 = pow(r817503, r817506);
double r817508 = r817504 * r817507;
double r817509 = 2.0;
double r817510 = 3.0;
double r817511 = pow(r817503, r817510);
double r817512 = r817509 * r817511;
double r817513 = -r817512;
double r817514 = r817508 + r817513;
return r817514;
}




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.2
Simplified0.1
rmApplied sqr-pow0.1
Applied associate-*r*0.1
Simplified0.1
Final simplification0.1
herbie shell --seed 2020047
(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))))