I would like to know if there is a way to determine/recognize a irrational number by computers. Let me explain it a little more. I know that, in computer science, a computable number "a" is a number that can be approximated by two rational number, i.e. (k1)/n<=a<=(k+1)/n where k&n are in N. Also, due to the limitation of floating point, all numbers in computers have limited number of significant figures. So, I was wondering if there is a way (more like an algorithm) to define irrational number for computers and consequently detect irrational number? Off course, I'm talking about an approximation with some adjustable level of accuracy. Thanks

Generate the continued fraction for the number. If it has a suspiciously* large number, truncate just before it: it's probably rational. Otherwise it's either irrational or rational with a large denominator; you can't easily tell the two apart. Of course since both rationals and irrationals are dense in the reals you can never know for sure with just an approximation, but this is a useful technique that often works in practice. * This can be made more precise using the GaussKuzmin distribution. But you can probably just eyeball it. 

