e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r194397 = a;
double r194398 = log(r194397);
double r194399 = b;
double r194400 = log(r194399);
double r194401 = r194398 + r194400;
double r194402 = exp(r194401);
return r194402;
}
double f(double a, double b) {
double r194403 = a;
double r194404 = b;
double r194405 = r194403 * r194404;
return r194405;
}




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))))