



Bits error versus i




Bits error versus n
| Original | 47.2 |
|---|---|
| Target | 47.2 |
| Herbie | 17.5 |
if (log (+ 1 (* 1/2 i))) < 134.206548239511Initial program 56.9
Taylor expanded around 0 57.2
Applied simplify27.3
rmApplied *-un-lft-identity27.3
Applied times-frac27.3
Applied add-cube-cbrt27.3
Applied times-frac27.2
Applied simplify27.2
Applied simplify11.3
if 134.206548239511 < (log (+ 1 (* 1/2 i))) < 600.2503137689805Initial program 29.3
Taylor expanded around 0 56.6
Applied simplify41.8
rmApplied add-log-exp32.3
Applied simplify32.3
if 600.2503137689805 < (log (+ 1 (* 1/2 i))) Initial program 28.3
rmApplied add-cube-cbrt28.5
Applied associate-*r*28.5
Time bar (total: 1.6m)Debug logProfile
herbie shell --seed '#(1071215679 2002590028 935158157 1944352234 2656991306 2955288481)'
(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))))