float.as_integer_ration

From python2.6, you can get a the integer ratio of a float.

$ ./python
Python 2.7b1+ (trunk:80674M, May 1 2010, 08:23:48)
[GCC 4.4.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 3.14.as_integer_ratio()
(7070651414971679, 2251799813685248)
>>> x*1.0/y
3.14
>>>