e^{\log a + \log b}a \cdot b
double f(double a, double b) {
double r6037752 = a;
double r6037753 = log(r6037752);
double r6037754 = b;
double r6037755 = log(r6037754);
double r6037756 = r6037753 + r6037755;
double r6037757 = exp(r6037756);
return r6037757;
}
double f(double a, double b) {
double r6037758 = a;
double r6037759 = b;
double r6037760 = r6037758 * r6037759;
return r6037760;
}




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