Mathematica Stack Exchange is a question and answer site for users of Mathematica. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a Physics problem which huge and tiny numbers and Mathematica just gives me a speed of my particles which is the speed of light. Then $1/\sqrt{1-v^2/c^2}$ becomes singular.

If I use smaller values for my radius r, it works, but with the radius of 300 light years, I just get error messages.

Is there some way to increase the precision or something like that?

share|improve this question
Have you tried using e.g. q = SetPrecision[q, 50] on all numeric variables? You could also try Rationalize. Be aware that either of these will be generating false precision. – Mr.Wizard Jun 16 '12 at 20:26
I tried SetPrecision[number, Infinity] and it works now. I am aware that the precision of my answer is not correct, but I just need it for a Physics homework example. – Martin Ueding Jun 16 '12 at 20:32
okay, I'll post that as an answer. – Mr.Wizard Jun 16 '12 at 20:34
Did you consider using Hartree Units? – Dr. belisarius Jun 16 '12 at 20:40
@belisarius: Interesting! I usually only use SI since I avoid any conversion then. I'll put that in the back of my mind though. – Martin Ueding Jun 16 '12 at 20:43
up vote 3 down vote accepted

You can use SetPrecision to set the interpreted precision of a numeric value, or Rationalize to convert it into an exact value.

Be cautious about manufacturing false precision.

share|improve this answer

Your Answer


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.