



Bits error versus i




Bits error versus n
| Original | 47.4 |
|---|---|
| Target | 47.1 |
| Herbie | 16.8 |
if i < -0.0024844054547568054Initial program 28.8
rmApplied flip3--28.8
Applied simplify28.8
Applied simplify28.8
if -0.0024844054547568054 < i < 5.494198354292155e-12Initial program 57.8
Taylor expanded around 0 57.7
Applied simplify25.2
rmApplied *-un-lft-identity25.2
Applied times-frac25.2
Applied add-cube-cbrt25.2
Applied times-frac25.1
Applied simplify8.7
Taylor expanded around 0 8.7
if 5.494198354292155e-12 < i Initial program 32.6
rmApplied div-inv32.7
Applied add-cube-cbrt32.7
Applied times-frac32.7
Time bar (total: 3.3m)Debug logProfile
herbie shell --seed '#(1070960995 739739648 2531964651 3069671617 351857262 3877178482)'
(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))))