\left(a + b\right) \cdot \left(a + b\right)
\left(a \cdot \left(b \cdot 2\right) + {a}^{2}\right) + {b}^{2}double f(double a, double b) {
double r84042 = a;
double r84043 = b;
double r84044 = r84042 + r84043;
double r84045 = r84044 * r84044;
return r84045;
}
double f(double a, double b) {
double r84046 = a;
double r84047 = b;
double r84048 = 2.0;
double r84049 = r84047 * r84048;
double r84050 = r84046 * r84049;
double r84051 = pow(r84046, r84048);
double r84052 = r84050 + r84051;
double r84053 = pow(r84047, r84048);
double r84054 = r84052 + r84053;
return r84054;
}




Bits error versus a




Bits error versus b
Results
| Original | 0.0 |
|---|---|
| Target | 0.0 |
| Herbie | 0.0 |
Initial program 0.0
rmApplied flip-+0.0
Applied flip3-+0.3
Applied frac-times0.3
Simplified0.3
Simplified0.3
Taylor expanded around 0 0.0
rmApplied associate-+r+0.0
Simplified0.0
rmApplied distribute-lft-in0.0
Simplified0.0
Final simplification0.0
herbie shell --seed 2020018
(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)))