e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r122413 = a;
double r122414 = log(r122413);
double r122415 = b;
double r122416 = log(r122415);
double r122417 = r122414 + r122416;
double r122418 = exp(r122417);
return r122418;
}
double f(double a, double b) {
double r122419 = b;
double r122420 = a;
double r122421 = r122419 * r122420;
return r122421;
}




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