



Bits error versus i




Bits error versus n
| Original | 47.3 |
|---|---|
| Target | 46.6 |
| Herbie | 17.2 |
if i < -131230828030.2063Initial program 26.9
rmApplied div-inv26.9
Applied add-cube-cbrt26.9
Applied times-frac27.5
Applied associate-*r*27.5
if -131230828030.2063 < i < 10.067585301687076Initial program 57.5
Taylor expanded around 0 57.3
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 simplify10.4
Taylor expanded around 0 10.3
if 10.067585301687076 < i Initial program 31.3
rmApplied div-sub31.3
Applied simplify33.6
Time bar (total: 2.0m)Debug logProfile
herbie shell --seed '#(1071501266 3581234924 1086666455 2685055582 1243441566 1802958749)'
(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))))