a \cdot \left(\left(b + c\right) + d\right)
\mathsf{fma}\left(d, a, \mathsf{fma}\left(a, b, a \cdot c\right)\right)double f(double a, double b, double c, double d) {
double r94815 = a;
double r94816 = b;
double r94817 = c;
double r94818 = r94816 + r94817;
double r94819 = d;
double r94820 = r94818 + r94819;
double r94821 = r94815 * r94820;
return r94821;
}
double f(double a, double b, double c, double d) {
double r94822 = d;
double r94823 = a;
double r94824 = b;
double r94825 = c;
double r94826 = r94823 * r94825;
double r94827 = fma(r94823, r94824, r94826);
double r94828 = fma(r94822, r94823, r94827);
return r94828;
}




Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied pow10.0
Applied pow10.0
Applied pow-prod-down0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2019353 +o rules:numerics
(FPCore (a b c d)
:name "Expression, p14"
:precision binary64
:pre (and (<= 56789 a 98765) (<= 0.0 b 1) (<= 0.0 c 0.0016773) (<= 0.0 d 0.0016773))
:herbie-target
(+ (* a b) (* a (+ c d)))
(* a (+ (+ b c) d)))