diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2008-09-13 01:43:28 +0000 |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2008-09-13 01:43:28 +0000 |
commit | 2a9b9cbea08c7c22a328926b0e0719fb197743a0 (patch) | |
tree | 51c8930c097a35c97db9cdae6f5af889424cf9bd /Demo/scripts/pi.py | |
parent | e91fcbdf691c687d1195fad342564e0b3442f444 (diff) | |
download | cpython-git-2a9b9cbea08c7c22a328926b0e0719fb197743a0.tar.gz |
#687648 from Robert Schuppenies: use classic division.
Diffstat (limited to 'Demo/scripts/pi.py')
-rwxr-xr-x | Demo/scripts/pi.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Demo/scripts/pi.py b/Demo/scripts/pi.py index 9b242451aa..e6e3b82f80 100755 --- a/Demo/scripts/pi.py +++ b/Demo/scripts/pi.py @@ -17,11 +17,11 @@ def main(): p, q, k = k*k, 2L*k+1L, k+1L a, b, a1, b1 = a1, b1, p*a+q*a1, p*b+q*b1 # Print common digits - d, d1 = a/b, a1/b1 + d, d1 = a//b, a1//b1 while d == d1: output(d) a, a1 = 10L*(a%b), 10L*(a1%b1) - d, d1 = a/b, a1/b1 + d, d1 = a//b, a1//b1 def output(d): # Use write() to avoid spaces between the digits |