



Bits error versus i




Bits error versus n
Results
| Original | 47.5 |
|---|---|
| Target | 47.3 |
| Herbie | 16.5 |
if i < -1440022132.324625Initial program 26.8
rmApplied add-sqr-sqrt27.6
Applied add-cube-cbrt27.6
Applied times-frac27.7
Applied associate-*r*27.7
if -1440022132.324625 < i < 3.625602950601606Initial program 58.1
Taylor expanded around 0 57.7
Applied simplify25.9
rmApplied *-un-lft-identity25.9
Applied times-frac25.9
Applied add-cube-cbrt25.9
Applied times-frac25.8
Applied simplify25.8
Applied simplify9.4
Taylor expanded around 0 9.4
if 3.625602950601606 < i Initial program 31.5
rmApplied div-inv31.6
Applied add-cube-cbrt31.6
Applied times-frac31.6
Applied associate-*r*31.6
Time bar (total: 1.7m)Debug logProfile
herbie shell --seed 2018167
(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))))