e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r5123385 = a;
double r5123386 = log(r5123385);
double r5123387 = b;
double r5123388 = log(r5123387);
double r5123389 = r5123386 + r5123388;
double r5123390 = exp(r5123389);
return r5123390;
}
double f(double a, double b) {
double r5123391 = a;
double r5123392 = b;
double r5123393 = r5123391 * r5123392;
return r5123393;
}




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