e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r11316783 = a;
double r11316784 = log(r11316783);
double r11316785 = b;
double r11316786 = log(r11316785);
double r11316787 = r11316784 + r11316786;
double r11316788 = exp(r11316787);
return r11316788;
}
double f(double a, double b) {
double r11316789 = a;
double r11316790 = b;
double r11316791 = r11316789 * r11316790;
return r11316791;
}




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