e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r184388 = a;
double r184389 = log(r184388);
double r184390 = b;
double r184391 = log(r184390);
double r184392 = r184389 + r184391;
double r184393 = exp(r184392);
return r184393;
}
double f(double a, double b) {
double r184394 = a;
double r184395 = b;
double r184396 = r184394 * r184395;
return r184396;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.7 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.7
rmApplied exp-sum5.4
Simplified4.7
Simplified0
Final simplification0
herbie shell --seed 2020036 +o rules:numerics
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))