e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r5521714 = a;
double r5521715 = log(r5521714);
double r5521716 = b;
double r5521717 = log(r5521716);
double r5521718 = r5521715 + r5521717;
double r5521719 = exp(r5521718);
return r5521719;
}
double f(double a, double b) {
double r5521720 = a;
double r5521721 = b;
double r5521722 = r5521720 * r5521721;
return r5521722;
}




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 2019130 +o rules:numerics
(FPCore (a b)
:name "Exp of sum of logs"
:herbie-target
(* a b)
(exp (+ (log a) (log b))))