e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r155241 = a;
double r155242 = log(r155241);
double r155243 = b;
double r155244 = log(r155243);
double r155245 = r155242 + r155244;
double r155246 = exp(r155245);
return r155246;
}
double f(double a, double b) {
double r155247 = a;
double r155248 = b;
double r155249 = r155247 * r155248;
return r155249;
}




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