e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r6528198 = a;
double r6528199 = log(r6528198);
double r6528200 = b;
double r6528201 = log(r6528200);
double r6528202 = r6528199 + r6528201;
double r6528203 = exp(r6528202);
return r6528203;
}
double f(double a, double b) {
double r6528204 = a;
double r6528205 = b;
double r6528206 = r6528204 * r6528205;
return r6528206;
}




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