e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r4811969 = a;
double r4811970 = log(r4811969);
double r4811971 = b;
double r4811972 = log(r4811971);
double r4811973 = r4811970 + r4811972;
double r4811974 = exp(r4811973);
return r4811974;
}
double f(double a, double b) {
double r4811975 = a;
double r4811976 = b;
double r4811977 = r4811975 * r4811976;
return r4811977;
}




Bits error versus a




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