e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r116942 = a;
double r116943 = log(r116942);
double r116944 = b;
double r116945 = log(r116944);
double r116946 = r116943 + r116945;
double r116947 = exp(r116946);
return r116947;
}
double f(double a, double b) {
double r116948 = b;
double r116949 = a;
double r116950 = r116948 * r116949;
return r116950;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.7 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.7
Taylor expanded around -inf 64.0
Simplified0
Final simplification0
herbie shell --seed 2019291
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))