



Bits error versus i




Bits error versus n
| Original | 47.3 |
|---|---|
| Target | 46.9 |
| Herbie | 18.1 |
if i < -2.2966207429113903e-07Initial program 28.8
rmApplied add-log-exp28.8
if -2.2966207429113903e-07 < i < 1.2022812913263827e+48Initial program 56.7
Taylor expanded around 0 57.0
Applied simplify27.5
rmApplied *-un-lft-identity27.5
Applied *-un-lft-identity27.5
Applied times-frac27.5
Applied simplify27.5
Applied simplify10.8
if 1.2022812913263827e+48 < i Initial program 31.5
Taylor expanded around inf 37.0
pow expressions.Time bar (total: 3.5m)Debug logProfile
herbie shell --seed '#(1063313015 2771194459 1594909340 1344785158 2223560818 546365448)'
(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))))