



Bits error versus i




Bits error versus n
| Original | 47.1 |
|---|---|
| Target | 46.7 |
| Herbie | 16.8 |
if (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < -inf.0 or -1.3656908641368595e-236 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < 1.667160863126875e-191Initial program 20.6
rmApplied div-inv20.6
Applied add-cube-cbrt20.6
Applied times-frac20.6
Applied simplify20.6
if -inf.0 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < -1.3656908641368595e-236 or 1.0098637413681323e+82 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < 5.5864212954745974e+305Initial program 57.7
Taylor expanded around 0 60.2
Applied simplify28.7
rmApplied *-un-lft-identity28.7
Applied times-frac28.7
Applied add-cube-cbrt28.7
Applied times-frac28.6
Applied simplify28.6
Applied simplify10.3
Taylor expanded around 0 10.3
if 1.667160863126875e-191 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) < 1.0098637413681323e+82Initial program 56.9
Taylor expanded around 0 58.6
Applied simplify17.2
rmApplied *-un-lft-identity17.2
Applied times-frac17.0
Applied associate-/r*17.1
Applied simplify17.1
if 5.5864212954745974e+305 < (* (exp (+ (log (* (cbrt (+ 1 (* 1/2 i))) 100)) (log (cbrt (+ 1 (* 1/2 i)))))) (* (cbrt (+ 1 (* 1/2 i))) n)) Initial program 27.9
rmApplied add-cube-cbrt28.2
Time bar (total: 2.3m)Debug logProfile
herbie shell --seed '#(1072840222 1305617769 1692503039 1353360431 4178980589 1488672652)'
(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))))