x \cdot \left(x \cdot x\right) + x \cdot x
\sqrt{\mathsf{fma}\left(x, x \cdot x, x \cdot x\right)} \cdot \sqrt{\mathsf{fma}\left(x, x \cdot x, x \cdot x\right)}double f(double x) {
double r3085929 = x;
double r3085930 = r3085929 * r3085929;
double r3085931 = r3085929 * r3085930;
double r3085932 = r3085931 + r3085930;
return r3085932;
}
double f(double x) {
double r3085933 = x;
double r3085934 = r3085933 * r3085933;
double r3085935 = fma(r3085933, r3085934, r3085934);
double r3085936 = sqrt(r3085935);
double r3085937 = r3085936 * r3085936;
return r3085937;
}




Bits error versus x
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
Simplified0.0
rmApplied add-sqr-sqrt0.0
Final simplification0.0
herbie shell --seed 2019168 +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)))