e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r3822993 = a;
double r3822994 = log(r3822993);
double r3822995 = b;
double r3822996 = log(r3822995);
double r3822997 = r3822994 + r3822996;
double r3822998 = exp(r3822997);
return r3822998;
}
double f(double a, double b) {
double r3822999 = a;
double r3823000 = b;
double r3823001 = r3822999 * r3823000;
return r3823001;
}




Bits error versus a




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