e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r5279390 = a;
double r5279391 = log(r5279390);
double r5279392 = b;
double r5279393 = log(r5279392);
double r5279394 = r5279391 + r5279393;
double r5279395 = exp(r5279394);
return r5279395;
}
double f(double a, double b) {
double r5279396 = a;
double r5279397 = b;
double r5279398 = r5279396 * r5279397;
return r5279398;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.7 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.7
Simplified0
Final simplification0
herbie shell --seed 2019172 +o rules:numerics
(FPCore (a b)
:name "Exp of sum of logs"
:herbie-target
(* a b)
(exp (+ (log a) (log b))))