



Bits error versus i




Bits error versus n
Results
| Original | 47.0 |
|---|---|
| Target | 46.6 |
| Herbie | 17.1 |
if i < -0.020151365423849446Initial program 27.9
rmApplied flip--27.9
Applied simplify27.9
if -0.020151365423849446 < i < 2.1500003764309357e+29Initial program 57.0
Taylor expanded around 0 57.0
Applied simplify26.5
rmApplied *-un-lft-identity26.5
Applied times-frac26.5
Applied add-cube-cbrt26.5
Applied times-frac26.4
Applied simplify26.4
Applied simplify10.6
if 2.1500003764309357e+29 < i Initial program 31.3
Taylor expanded around 0 56.8
Applied simplify39.3
rmApplied add-log-exp30.7
Applied simplify30.3
Time bar (total: 2.7m)Debug logProfile
herbie shell --seed 2018193
(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))))