1
$\begingroup$

Why is the array produced by the following not displayed in TableForm?

NumberForm[Table[Sum[(-1)^n 1/n!, {n, 0, i}], {i, 10}] // N, 12] // TableForm

{0., 0.5, 0.333333333333, 0.375, 0.366666666667, 0.368055555556, 0.367857142857, 0.367881944444, 0.367879188713, 0.367879464286}

What can I do to solve this issue?

$\endgroup$
3
  • 3
    $\begingroup$ TableForm works on Lists; you want to use it on something with a head NumberForm. Try NumberForm[TableForm@Table[Sum[(-1)^n 1/n!, {n, 0, i}], {i, 10}] // N, 12]. $\endgroup$
    – corey979
    Commented Nov 19, 2016 at 21:41
  • $\begingroup$ related $\endgroup$
    – andre314
    Commented Nov 19, 2016 at 22:30
  • $\begingroup$ Also related: (6197), (23006), (47330) $\endgroup$
    – Mr.Wizard
    Commented Nov 20, 2016 at 8:02

0

Browse other questions tagged or ask your own question.