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 r94528 = a;
double r94529 = b;
double r94530 = c;
double r94531 = r94529 + r94530;
double r94532 = d;
double r94533 = r94531 + r94532;
double r94534 = r94528 * r94533;
return r94534;
}
double f(double a, double b, double c, double d) {
double r94535 = d;
double r94536 = a;
double r94537 = b;
double r94538 = c;
double r94539 = r94536 * r94538;
double r94540 = fma(r94536, r94537, r94539);
double r94541 = fma(r94535, r94536, r94540);
return r94541;
}




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 2020056 +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)))