e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r176020 = a;
double r176021 = log(r176020);
double r176022 = b;
double r176023 = log(r176022);
double r176024 = r176021 + r176023;
double r176025 = exp(r176024);
return r176025;
}
double f(double a, double b) {
double r176026 = a;
double r176027 = b;
double r176028 = r176026 * r176027;
return r176028;
}




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