e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r246544 = a;
double r246545 = log(r246544);
double r246546 = b;
double r246547 = log(r246546);
double r246548 = r246545 + r246547;
double r246549 = exp(r246548);
return r246549;
}
double f(double a, double b) {
double r246550 = a;
double r246551 = b;
double r246552 = r246550 * r246551;
return r246552;
}




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