



Bits error versus i




Bits error versus n
| Original | 47.6 |
|---|---|
| Target | 46.5 |
| Herbie | 17.4 |
if (exp (log (* (/ i i) (+ (+ 1 (* i 1/2)) (* (* i i) 1/6))))) < 1639.7473225334033Initial program 57.3
Taylor expanded around 0 25.4
rmApplied associate-/r/9.8
rmApplied add-exp-log9.8
rmApplied add-cube-cbrt9.8
if 1639.7473225334033 < (exp (log (* (/ i i) (+ (+ 1 (* i 1/2)) (* (* i i) 1/6))))) Initial program 30.5
rmApplied add-cube-cbrt30.8
Applied add-cube-cbrt30.8
Applied times-frac30.8
Applied associate-*r*30.8
Time bar (total: 2.5m)Debug logProfile
herbie shell --seed '#(1070355188 2193211668 3977393919 3454156579 3755371326 1656365382)'
(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))))