diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2008-09-13 01:43:28 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2008-09-13 01:43:28 (GMT) |
commit | 2a9b9cbea08c7c22a328926b0e0719fb197743a0 (patch) | |
tree | 51c8930c097a35c97db9cdae6f5af889424cf9bd /Demo/scripts/pi.py | |
parent | e91fcbdf691c687d1195fad342564e0b3442f444 (diff) | |
download | cpython-2a9b9cbea08c7c22a328926b0e0719fb197743a0.zip cpython-2a9b9cbea08c7c22a328926b0e0719fb197743a0.tar.gz cpython-2a9b9cbea08c7c22a328926b0e0719fb197743a0.tar.bz2 |
#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 9b24245..e6e3b82 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 |