\left(a + \left(b + \left(c + d\right)\right)\right) \cdot 2
\log \left(e^{\log \left(e^{d} \cdot \left(e^{b + c} \cdot e^{a}\right)\right)}\right) \cdot 2(FPCore (a b c d) :precision binary64 (* (+ a (+ b (+ c d))) 2.0))
(FPCore (a b c d) :precision binary64 (* (log (exp (log (* (exp d) (* (exp (+ b c)) (exp a)))))) 2.0))
double code(double a, double b, double c, double d) {
return (a + (b + (c + d))) * 2.0;
}
double code(double a, double b, double c, double d) {
return log(exp(log(exp(d) * (exp(b + c) * exp(a))))) * 2.0;
}




Bits error versus a




Bits error versus b




Bits error versus c




Bits error versus d
Results
| Original | 3.7 |
|---|---|
| Target | 3.8 |
| Herbie | 1.4 |
Initial program 3.7
rmApplied add-log-exp_binary64_21633.7
Applied add-log-exp_binary64_21633.7
Applied sum-log_binary64_22153.7
Applied add-log-exp_binary64_21633.7
Applied sum-log_binary64_22152.8
Applied add-log-exp_binary64_21632.8
Applied sum-log_binary64_22151.5
Simplified3.0
rmApplied add-log-exp_binary64_21633.0
Applied add-log-exp_binary64_21633.0
Applied sum-log_binary64_22153.0
Applied add-log-exp_binary64_21633.0
Applied sum-log_binary64_22151.4
Final simplification1.4
herbie shell --seed 2021027
(FPCore (a b c d)
:name "Expression, p6"
:precision binary64
:pre (and (<= -14.0 a -13.0) (<= -3.0 b -2.0) (<= 3.0 c 3.5) (<= 12.5 d 13.5))
:herbie-target
(+ (* (+ a b) 2.0) (* (+ c d) 2.0))
(* (+ a (+ b (+ c d))) 2.0))