e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r10919 = a;
double r10920 = log(r10919);
double r10921 = b;
double r10922 = log(r10921);
double r10923 = r10920 + r10922;
double r10924 = exp(r10923);
return r10924;
}
double f(double a, double b) {
double r10925 = b;
double r10926 = a;
double r10927 = r10925 * r10926;
return r10927;
}




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