e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r187949 = a;
double r187950 = log(r187949);
double r187951 = b;
double r187952 = log(r187951);
double r187953 = r187950 + r187952;
double r187954 = exp(r187953);
return r187954;
}
double f(double a, double b) {
double r187955 = a;
double r187956 = b;
double r187957 = r187955 * r187956;
return r187957;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.8 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.8
rmApplied exp-sum5.5
Simplified4.8
Simplified0
Final simplification0
herbie shell --seed 2019322
(FPCore (a b)
:name "Exp of sum of logs"
:precision binary64
:herbie-target
(* a b)
(exp (+ (log a) (log b))))