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 r94769 = a;
double r94770 = b;
double r94771 = c;
double r94772 = r94770 + r94771;
double r94773 = d;
double r94774 = r94772 + r94773;
double r94775 = r94769 * r94774;
return r94775;
}
double f(double a, double b, double c, double d) {
double r94776 = d;
double r94777 = a;
double r94778 = b;
double r94779 = c;
double r94780 = r94777 * r94779;
double r94781 = fma(r94777, r94778, r94780);
double r94782 = fma(r94776, r94777, r94781);
return r94782;
}




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