



Bits error versus i




Bits error versus n
| Original | 47.2 |
|---|---|
| Target | 46.7 |
| Herbie | 17.0 |
if (+ 1 (* 1/2 i)) < 0.061008103708559136 or 7.356011991075024e+16 < (+ 1 (* 1/2 i)) Initial program 29.0
rmApplied add-log-exp29.1
if 0.061008103708559136 < (+ 1 (* 1/2 i)) < 7.356011991075024e+16Initial program 57.4
Taylor expanded around 0 57.2
Applied simplify26.1
rmApplied *-un-lft-identity26.1
Applied times-frac26.1
Applied add-cube-cbrt26.1
Applied times-frac26.0
Applied simplify26.0
Applied simplify10.3
Time bar (total: 2.1m)Debug logProfile
herbie shell --seed '#(1071373924 2949776965 1885069702 3247780810 90874544 2263903749)'
(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))))