



Bits error versus i




Bits error versus n
| Original | 47.4 |
|---|---|
| Target | 47.2 |
| Herbie | 16.8 |
if (+ (* i 1/2) 1) < 0.9983437297377878Initial program 28.8
rmApplied flip3--28.8
Applied simplify28.8
Applied simplify28.8
if 0.9983437297377878 < (+ (* i 1/2) 1) < 1.0000000000024705Initial 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 simplify25.1
Applied simplify8.7
if 1.0000000000024705 < (+ (* i 1/2) 1) Initial program 32.7
rmApplied div-inv32.7
Applied associate-/r*32.7
Time bar (total: 1.7m)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))))