Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

I have this 200 digit number where I want to get the IntegerDigits, but the decimal point is in the way.

5.9786377666105440959755656271823065138015646836250389374946790881539\
  7157216930920631092404062126177741432101097347028242720848122219396854\
  08452395344964186804  

What do I need to do to strip the decimal point to get a list of the digits?

share|improve this question
3  
Do you know RealDigits ? –  Artes Nov 26 '12 at 15:51
    
Artes, I'm new around here so please forgive the question but why didn't you simply put that as an answer? Is there a preference for comments rather than answers? –  WalkingRandomly Nov 26 '12 at 16:02
    
@WalkingRandomly, No you are completely right but sometimes (older) member just give a short comment, because they don't need the reputation. –  halirutan Nov 26 '12 at 16:05
    
@WalkingRandomly I think this question is appropriate for users with lower reputation. If you are interested in some more advanced problems with RelaDigits look at this question : mathematica.stackexchange.com/questions/6323/… –  Artes Nov 26 '12 at 16:06
1  
@WalkingRandomly Well, this is not pure altruism, I believe. I think most high-rep users would agree that we need as many skilled M users to quickly get the rep. and associated privileges, as possible, to help manage our fast-growing community. In some sense, our survival as a community (preserving its culture, purpose, ways of communications etc) crucially depends on this, in the long-term at least. –  Leonid Shifrin Nov 26 '12 at 16:19

1 Answer 1

up vote 10 down vote accepted

What you are looking for is the function RealDigits

RealDigits[5.978637766610544095975565627][[1]] 

It should give you the functionality you need.

share|improve this answer
1  
I edited you answer to make the inline-code into a code-block which is better readable. Furthermore, you don't need to give the full number IMO. A smaller one which fits on the line is sufficient to show the usage. –  halirutan Nov 26 '12 at 16:02
    
And btw, if you answered the question it kind of suggests, that you find the question OK. Therefore, upvote it. You should read the FAQ and maybe join the chat for smalltalk. And finally, welcome! Nice to have you here. –  halirutan Nov 26 '12 at 16:11
3  
thanks for that, such gentle corrections are a nice way to learn how best to be a good SE citizen. –  WalkingRandomly Nov 26 '12 at 16:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.