e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r143991 = a;
double r143992 = log(r143991);
double r143993 = b;
double r143994 = log(r143993);
double r143995 = r143992 + r143994;
double r143996 = exp(r143995);
return r143996;
}
double f(double a, double b) {
double r143997 = a;
double r143998 = b;
double r143999 = r143997 * r143998;
return r143999;
}




Bits error versus a




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