



Bits error versus i




Bits error versus n
Results
| Original | 41.9 |
|---|---|
| Target | 42.0 |
| Herbie | 18.8 |
if n < -0.503902432264651 or -1.0212045574144143e-202 < n Initial program 46.6
rmApplied add-exp-log49.5
Applied pow-exp49.5
Applied expm1-def45.4
Simplified19.2
if -0.503902432264651 < n < -1.0212045574144143e-202Initial program 16.4
rmApplied associate-*r/16.4
Final simplification18.8
Time bar (total: 40.5s)Debug logProfile
herbie shell --seed 2018336 +o rules:numerics
(FPCore (i n)
:name "Compound Interest"
:herbie-target
(* 100 (/ (- (exp (* n (if (== (+ 1 (/ i n)) 1) (/ i n) (/ (* (/ i n) (log (+ 1 (/ i n)))) (- (+ (/ i n) 1) 1))))) 1) (/ i n)))
(* 100 (/ (- (pow (+ 1 (/ i n)) n) 1) (/ i n))))