e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r91208 = a;
double r91209 = log(r91208);
double r91210 = b;
double r91211 = log(r91210);
double r91212 = r91209 + r91211;
double r91213 = exp(r91212);
return r91213;
}
double f(double a, double b) {
double r91214 = b;
double r91215 = a;
double r91216 = r91214 * r91215;
return r91216;
}




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 2019326 +o rules:numerics
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))