



Bits error versus i




Bits error versus n
Results
| Original | 47.5 |
|---|---|
| Target | 46.9 |
| Herbie | 11.2 |
if i < -1.4597379955744417e-06Initial program 28.8
rmApplied add-exp-log28.8
Applied pow-exp28.8
Applied simplify5.7
if -1.4597379955744417e-06 < i < 1.2350772268671153e-12Initial program 57.8
Taylor expanded around 0 57.5
Applied simplify26.1
rmApplied fma-udef26.1
Applied distribute-lft-in26.6
Applied simplify26.1
Applied simplify8.8
if 1.2350772268671153e-12 < i Initial program 33.1
Taylor expanded around inf 31.1
Applied simplify31.0
Time bar (total: 4.5m)Debug logProfile
herbie shell --seed '#(1072967564 1937075727 894099792 790700740 1036514779 1027793188)' +o rules:numerics
(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))))