



Bits error versus i




Bits error versus n
Results
| Original | 47.4 |
|---|---|
| Target | 47.2 |
| Herbie | 16.9 |
if i < -0.00012824320873547763Initial program 28.1
rmApplied add-sqr-sqrt29.1
Applied add-cube-cbrt29.1
Applied times-frac29.2
Applied associate-*r*29.2
if -0.00012824320873547763 < i < 6.305972386755532e-07Initial program 57.6
Taylor expanded around 0 57.3
Applied simplify25.7
rmApplied *-un-lft-identity25.7
Applied times-frac25.7
Applied add-cube-cbrt25.8
Applied times-frac25.7
Applied simplify25.7
Applied simplify9.2
if 6.305972386755532e-07 < i Initial program 32.3
rmApplied associate-*r/32.3
Time bar (total: 2.3m)Debug logProfile
herbie shell --seed 2018166
(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))))