e^{\log a + \log b}b \cdot a
double f(double a, double b) {
double r173454 = a;
double r173455 = log(r173454);
double r173456 = b;
double r173457 = log(r173456);
double r173458 = r173455 + r173457;
double r173459 = exp(r173458);
return r173459;
}
double f(double a, double b) {
double r173460 = b;
double r173461 = a;
double r173462 = r173460 * r173461;
return r173462;
}




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