\left(a + b\right) \cdot \left(a + b\right)
\mathsf{fma}\left(\mathsf{fma}\left(2, a, b\right), b, {a}^{2}\right)double f(double a, double b) {
double r106488 = a;
double r106489 = b;
double r106490 = r106488 + r106489;
double r106491 = r106490 * r106490;
return r106491;
}
double f(double a, double b) {
double r106492 = 2.0;
double r106493 = a;
double r106494 = b;
double r106495 = fma(r106492, r106493, r106494);
double r106496 = pow(r106493, r106492);
double r106497 = fma(r106495, r106494, r106496);
return r106497;
}




Bits error versus a




Bits error versus b
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied add-cbrt-cube0.5
Applied add-cbrt-cube0.8
Applied cbrt-unprod0.5
Simplified0.5
Taylor expanded around 0 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020049 +o rules:numerics
(FPCore (a b)
:name "Expression 4, p15"
:precision binary64
:pre (and (<= 5 a 10) (<= 0.0 b 0.001))
:herbie-target
(+ (+ (+ (* b a) (* b b)) (* b a)) (* a a))
(* (+ a b) (+ a b)))