=== modified file 'Doc/tutorial/introduction.rst'
--- Doc/tutorial/introduction.rst 2008-01-07 17:32:13 +0000
+++ Doc/tutorial/introduction.rst 2008-07-16 22:21:13 +0000
@@ -55,6 +55,10 @@
5.0
>>> 8/5 # Fractions aren't lost when dividing integers
1.6000000000000001
+ >>> (7/2).as_integer_ratio() # You can even get back dividend and divisor
+ (7, 2)
+ >>> (8/5).as_integer_ratio() # Although you have to mind limitations in
+ (3602879701896397, 2251799813685248) # floating point arithmetic
Note: You might not see exactly the same result; floating point results can
differ from one machine to another. We will say more later about controlling