I am trying to get from a number such as $12.345$ to a list $\{1,2,3,4,5\}$. My best attempt so far has been:
First[RealDigits[12.345]]
however this of course gives $\{1, 2, 3, 4, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0\}$ since it assumes the number to have infinite precision.
Any help is greatly appreciated
First[RealDigits[Rationalize[12.345]]]? – J. M.'s missing motivation May 21 '17 at 18:44100.00? – Ray Shadow May 21 '17 at 19:00