



Bits error versus i




Bits error versus n
Results
| Original | 47.2 |
|---|---|
| Target | 46.8 |
| Herbie | 17.2 |
if (+ (* i 1/2) 1) < 0.9999999999999787Initial program 29.6
rmApplied add-cube-cbrt29.6
if 0.9999999999999787 < (+ (* i 1/2) 1) < 5.156473555252393e+23Initial program 57.5
Taylor expanded around 0 57.3
Applied simplify25.8
rmApplied *-un-lft-identity25.8
Applied times-frac25.9
Applied add-cube-cbrt25.9
Applied times-frac25.8
Applied simplify25.8
Applied simplify9.5
if 5.156473555252393e+23 < (+ (* i 1/2) 1) Initial program 30.5
Taylor expanded around 0 57.4
Applied simplify41.1
rmApplied add-log-exp31.6
Applied simplify31.3
Time bar (total: 2.4m)Debug logProfile
herbie shell --seed 2018170
(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))))