\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 r100582 = a;
double r100583 = b;
double r100584 = r100582 + r100583;
double r100585 = r100584 * r100584;
return r100585;
}
double f(double a, double b) {
double r100586 = 2.0;
double r100587 = a;
double r100588 = b;
double r100589 = fma(r100586, r100587, r100588);
double r100590 = pow(r100587, r100586);
double r100591 = fma(r100589, r100588, r100590);
return r100591;
}




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.7
Applied cbrt-unprod0.5
Simplified0.5
Taylor expanded around 0 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020064 +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)))