



Bits error versus i




Bits error versus n
Results
| Original | 47.5 |
|---|---|
| Target | 47.0 |
| Herbie | 18.5 |
if (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < -1.3570284883755644e-192Initial program 54.3
Taylor expanded around 0 61.6
Applied simplify28.9
rmApplied *-un-lft-identity28.9
Applied times-frac28.9
Applied add-cube-cbrt28.9
Applied times-frac28.8
Applied simplify28.8
Applied simplify12.4
Taylor expanded around 0 12.3
if -1.3570284883755644e-192 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < 1.6918520627528846e-280Initial program 22.7
rmApplied div-inv22.7
Applied add-cube-cbrt22.7
Applied times-frac22.7
Applied associate-*r*22.7
if 1.6918520627528846e-280 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < 2.184763415670238e+37Initial program 52.5
Taylor expanded around 0 53.7
Applied simplify21.3
rmApplied add-cube-cbrt21.8
Applied times-frac21.8
Applied add-sqr-sqrt21.8
Applied times-frac21.8
if 2.184763415670238e+37 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < 6.075228628301184e+306Initial program 59.2
Taylor expanded around 0 60.1
Applied simplify31.7
rmApplied clear-num31.7
Applied simplify12.1
if 6.075228628301184e+306 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) Initial program 28.8
rmApplied flip--28.8
Applied simplify28.8
Time bar (total: 2.2m)Debug logProfile
herbie shell --seed 2018201
(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))))