



Bits error versus i




Bits error versus n
Results
| Original | 47.5 |
|---|---|
| Target | 46.9 |
| Herbie | 17.3 |
if (+ 1 (* 1/2 i)) < -3.5964007201178633e+21 or 1.00000000000054 < (+ 1 (* 1/2 i)) < 2.3039825294862687e+153Initial program 28.3
rmApplied flip--28.3
Applied simplify28.3
if -3.5964007201178633e+21 < (+ 1 (* 1/2 i)) < 1.00000000000054Initial program 57.3
Taylor expanded around 0 57.5
Applied simplify26.4
rmApplied *-un-lft-identity26.4
Applied times-frac26.4
Applied add-cube-cbrt26.4
Applied times-frac26.3
Applied simplify26.3
Applied simplify10.8
Taylor expanded around 0 10.7
if 2.3039825294862687e+153 < (+ 1 (* 1/2 i)) Initial program 32.3
Taylor expanded around 0 63.2
Applied simplify35.1
rmApplied add-exp-log35.1
Applied add-exp-log34.7
Applied div-exp34.7
Time bar (total: 6.9m)Debug logProfile
herbie shell --seed '#(1072967564 1937075727 894099792 790700740 1036514779 1027793188)'
(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))))