e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r149831 = a;
double r149832 = log(r149831);
double r149833 = b;
double r149834 = log(r149833);
double r149835 = r149832 + r149834;
double r149836 = exp(r149835);
return r149836;
}
double f(double a, double b) {
double r149837 = a;
double r149838 = b;
double r149839 = r149837 * r149838;
return r149839;
}




Bits error versus a




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