e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r5585244 = a;
double r5585245 = log(r5585244);
double r5585246 = b;
double r5585247 = log(r5585246);
double r5585248 = r5585245 + r5585247;
double r5585249 = exp(r5585248);
return r5585249;
}
double f(double a, double b) {
double r5585250 = a;
double r5585251 = b;
double r5585252 = r5585250 * r5585251;
return r5585252;
}




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