e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r165197 = a;
double r165198 = log(r165197);
double r165199 = b;
double r165200 = log(r165199);
double r165201 = r165198 + r165200;
double r165202 = exp(r165201);
return r165202;
}
double f(double a, double b) {
double r165203 = a;
double r165204 = b;
double r165205 = r165203 * r165204;
return r165205;
}




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