e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r145119 = a;
double r145120 = log(r145119);
double r145121 = b;
double r145122 = log(r145121);
double r145123 = r145120 + r145122;
double r145124 = exp(r145123);
return r145124;
}
double f(double a, double b) {
double r145125 = a;
double r145126 = b;
double r145127 = r145125 * r145126;
return r145127;
}




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