e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r21866065 = a;
double r21866066 = log(r21866065);
double r21866067 = b;
double r21866068 = log(r21866067);
double r21866069 = r21866066 + r21866068;
double r21866070 = exp(r21866069);
return r21866070;
}
double f(double a, double b) {
double r21866071 = a;
double r21866072 = b;
double r21866073 = r21866071 * r21866072;
return r21866073;
}




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