



Bits error versus i




Bits error versus n
| Original | 47.1 |
|---|---|
| Target | 46.7 |
| Herbie | 16.8 |
if i < -6.086370500870421e-15Initial program 28.5
rmApplied associate-*r/28.4
if -6.086370500870421e-15 < i < 0.14419417012382005Initial program 57.4
Taylor expanded around 0 57.2
Applied simplify25.4
rmApplied *-un-lft-identity25.4
Applied times-frac25.4
Applied add-cube-cbrt25.4
Applied times-frac25.3
Applied simplify9.1
Taylor expanded around 0 9.1
if 0.14419417012382005 < i Initial program 32.0
rmApplied div-inv32.1
Applied add-cube-cbrt32.1
Applied times-frac32.1
Time bar (total: 1.8m)Debug logProfile
herbie shell --seed '#(1070706311 3771791028 4128836681 4194990999 2341756049 504035650)'
(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))))