



Bits error versus i




Bits error versus n
Results
| Original | 47.5 |
|---|---|
| Target | 46.9 |
| Herbie | 16.7 |
if (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < -1.7749380109575957e+308 or -8.819795090297178e-190 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < 2.860878887320379e-287Initial program 18.9
rmApplied div-inv18.9
Applied *-un-lft-identity18.9
Applied times-frac18.9
Applied associate-*r*18.9
Applied simplify18.9
if -1.7749380109575957e+308 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < -8.819795090297178e-190 or 2.5004732237782533e+58 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < 3.5565440192703386e+306Initial program 58.7
Taylor expanded around 0 60.9
Applied simplify28.4
rmApplied *-un-lft-identity28.4
Applied times-frac28.4
Applied add-cube-cbrt28.4
Applied times-frac28.3
Applied simplify28.3
Applied simplify9.0
Taylor expanded around 0 9.0
if 2.860878887320379e-287 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < 2.5004732237782533e+58Initial program 52.5
Taylor expanded around 0 53.9
Applied simplify20.1
rmApplied add-cube-cbrt20.6
Applied associate-/r*20.6
Applied simplify20.5
if 3.5565440192703386e+306 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) Initial program 28.1
rmApplied flip3--28.1
Applied simplify28.1
Applied simplify28.1
Time bar (total: 2.6m)Debug logProfile
herbie shell --seed 2018178
(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))))