e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r174498 = a;
double r174499 = log(r174498);
double r174500 = b;
double r174501 = log(r174500);
double r174502 = r174499 + r174501;
double r174503 = exp(r174502);
return r174503;
}
double f(double a, double b) {
double r174504 = a;
double r174505 = b;
double r174506 = r174504 * r174505;
return r174506;
}




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