e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r125197 = a;
double r125198 = log(r125197);
double r125199 = b;
double r125200 = log(r125199);
double r125201 = r125198 + r125200;
double r125202 = exp(r125201);
return r125202;
}
double f(double a, double b) {
double r125203 = a;
double r125204 = b;
double r125205 = r125203 * r125204;
return r125205;
}




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