



Bits error versus i




Bits error versus n
Results
| Original | 47.5 |
|---|---|
| Target | 47.2 |
| Herbie | 17.5 |
if (* (cbrt (+ (* 1/2 i) 1)) (- (+ 100 (* i 100/3)) (* 25/9 (* i i)))) < -3.5244619032097613e+190Initial program 31.0
rmApplied div-inv31.0
Applied add-cube-cbrt31.0
Applied times-frac31.1
Applied simplify31.0
if -3.5244619032097613e+190 < (* (cbrt (+ (* 1/2 i) 1)) (- (+ 100 (* i 100/3)) (* 25/9 (* i i)))) < -4.418830388816365e+93Initial program 30.9
Taylor expanded around 0 50.5
Applied simplify50.5
rmApplied add-cube-cbrt50.5
Applied associate-/r*50.5
Applied simplify50.5
if -4.418830388816365e+93 < (* (cbrt (+ (* 1/2 i) 1)) (- (+ 100 (* i 100/3)) (* 25/9 (* i i)))) < -1.34040328536697e+64Initial program 36.1
rmApplied associate-*r/36.1
if -1.34040328536697e+64 < (* (cbrt (+ (* 1/2 i) 1)) (- (+ 100 (* i 100/3)) (* 25/9 (* i i)))) < 3.0894318730283632e+44Initial program 56.9
Taylor expanded around 0 57.2
Applied simplify27.1
rmApplied *-un-lft-identity27.1
Applied times-frac27.2
Applied add-cube-cbrt27.2
Applied times-frac27.1
Applied simplify27.1
Applied simplify11.7
Taylor expanded around 0 11.7
if 3.0894318730283632e+44 < (* (cbrt (+ (* 1/2 i) 1)) (- (+ 100 (* i 100/3)) (* 25/9 (* i i)))) Initial program 27.1
rmApplied associate-*r/27.1
Time bar (total: 2.2m)Debug logProfile
herbie shell --seed 2018206
(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))))