e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r20681312 = a;
double r20681313 = log(r20681312);
double r20681314 = b;
double r20681315 = log(r20681314);
double r20681316 = r20681313 + r20681315;
double r20681317 = exp(r20681316);
return r20681317;
}
double f(double a, double b) {
double r20681318 = a;
double r20681319 = b;
double r20681320 = r20681318 * r20681319;
return r20681320;
}




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