



Bits error versus i




Bits error versus n
Results
| Original | 47.5 |
|---|---|
| Target | 46.8 |
| Herbie | 17.0 |
if (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < -7.624336848879026e+306 or -3.00713314653184e-223 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < 9.622988130177224e-234Initial program 16.9
rmApplied div-inv16.9
Applied add-cube-cbrt16.9
Applied times-frac16.9
Applied associate-*r*16.9
if -7.624336848879026e+306 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < -3.00713314653184e-223 or 3.9957841037641655e+77 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < 1.0860377852729923e+303Initial program 58.2
Taylor expanded around 0 60.6
Applied simplify30.1
rmApplied *-un-lft-identity30.1
Applied times-frac30.0
Applied add-cube-cbrt30.0
Applied times-frac30.0
Applied simplify30.0
Applied simplify10.3
if 9.622988130177224e-234 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < 3.9957841037641655e+77Initial program 55.7
Taylor expanded around 0 57.1
Applied simplify17.4
rmApplied add-cube-cbrt17.9
Applied associate-/l*18.0
if 1.0860377852729923e+303 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) Initial program 29.0
rmApplied add-cube-cbrt29.2
Applied associate-*r*29.2
Time bar (total: 2.2m)Debug logProfile
herbie shell --seed 2018195
(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))))