e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r125655 = a;
double r125656 = log(r125655);
double r125657 = b;
double r125658 = log(r125657);
double r125659 = r125656 + r125658;
double r125660 = exp(r125659);
return r125660;
}
double f(double a, double b) {
double r125661 = a;
double r125662 = b;
double r125663 = r125661 * r125662;
return r125663;
}




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.7
Simplified0
Final simplification0
herbie shell --seed 2019294
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))