x \cdot \left(x \cdot x\right) + x \cdot x
\frac{(\left(x \cdot x\right) \cdot \left(x \cdot \left(x \cdot x\right)\right) + \left(x \cdot x\right))_*}{\left(1 - x\right) + x \cdot x}double f(double x) {
double r7942065 = x;
double r7942066 = r7942065 * r7942065;
double r7942067 = r7942065 * r7942066;
double r7942068 = r7942067 + r7942066;
return r7942068;
}
double f(double x) {
double r7942069 = x;
double r7942070 = r7942069 * r7942069;
double r7942071 = r7942069 * r7942070;
double r7942072 = fma(r7942070, r7942071, r7942070);
double r7942073 = 1.0;
double r7942074 = r7942073 - r7942069;
double r7942075 = r7942074 + r7942070;
double r7942076 = r7942072 / r7942075;
return r7942076;
}




Bits error versus x
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied distribute-lft1-in0.0
rmApplied flip3-+0.0
Applied associate-*l/0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019119 +o rules:numerics
(FPCore (x)
:name "Expression 3, p15"
:pre (<= 0 x 2)
:herbie-target
(* (* (+ 1.0 x) x) x)
(+ (* x (* x x)) (* x x)))