e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r18338534 = a;
double r18338535 = log(r18338534);
double r18338536 = b;
double r18338537 = log(r18338536);
double r18338538 = r18338535 + r18338537;
double r18338539 = exp(r18338538);
return r18338539;
}
double f(double a, double b) {
double r18338540 = a;
double r18338541 = b;
double r18338542 = r18338540 * r18338541;
return r18338542;
}




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