e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r120424 = a;
double r120425 = log(r120424);
double r120426 = b;
double r120427 = log(r120426);
double r120428 = r120425 + r120427;
double r120429 = exp(r120428);
return r120429;
}
double f(double a, double b) {
double r120430 = a;
double r120431 = b;
double r120432 = r120430 * r120431;
return r120432;
}




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 2019297
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))