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 r101440 = a;
double r101441 = b;
double r101442 = c;
double r101443 = r101441 + r101442;
double r101444 = d;
double r101445 = r101443 + r101444;
double r101446 = r101440 * r101445;
return r101446;
}
double f(double a, double b, double c, double d) {
double r101447 = d;
double r101448 = a;
double r101449 = b;
double r101450 = c;
double r101451 = r101448 * r101450;
double r101452 = fma(r101448, r101449, r101451);
double r101453 = fma(r101447, r101448, r101452);
return r101453;
}




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
Taylor expanded around inf 0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020024 +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)))