e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r7696842 = a;
double r7696843 = log(r7696842);
double r7696844 = b;
double r7696845 = log(r7696844);
double r7696846 = r7696843 + r7696845;
double r7696847 = exp(r7696846);
return r7696847;
}
double f(double a, double b) {
double r7696848 = a;
double r7696849 = b;
double r7696850 = r7696848 * r7696849;
return r7696850;
}




Bits error versus a




Bits error versus b
Results
| Original | 5.6 |
|---|---|
| Target | 0 |
| Herbie | 0 |
Initial program 5.6
Simplified0
Final simplification0
herbie shell --seed 2019200
(FPCore (a b)
:name "Exp of sum of logs"
:herbie-target
(* a b)
(exp (+ (log a) (log b))))