Fun with math: Dividing one by 998001 yields a surprising result
1–10 of 99 posts
Re: Fun with math: Dividing one by 998001 yields a surprising result
#2http://www.math.ucsb.edu/~agboola/teaching/2005/winter/old-1...
Re: Fun with math: Dividing one by 998001 yields a surprising result
#3Re: Fun with math: Dividing one by 998001 yields a surprising result
#4 import decimal
decimal.getcontext().prec=1000
dec = decimal.Decimal(1)/decimal.Decimal(998001)
#now doctor it up to see the numbers
strdec = str(dec)[2:] #chop off the '0.'
nums = zip(strdec[::3],strdec[1::3],strdec[2::3])
print numsRe: Fun with math: Dividing one by 998001 yields a surprising result
#5Can anyone explain why it repeats in this way, or link to a place that has an explanation?
Re: Fun with math: Dividing one by 998001 yields a surprising result
#6This can be seen in python with (I had to dig into the docs for this, so here are the fruits of my labor :) ) import decimal decimal.getcontext().prec=1000 dec = decimal.Decimal(1)/decimal.Decimal(998001) #now doctor it up to see the numbers strdec = str(dec)[2:] #chop off the '0.' nums = zip(strdec[::3],strdec[1::3],strdec[2::3]) print nums
Re: Fun with math: Dividing one by 998001 yields a surprising result
#7Re: Fun with math: Dividing one by 998001 yields a surprising result
#8This can be seen in python with (I had to dig into the docs for this, so here are the fruits of my labor :) ) import decimal decimal.getcontext().prec=1000 dec = decimal.Decimal(1)/decimal.Decimal(998001) #now doctor it up to see the numbers strdec = str(dec)[2:] #chop off the '0.' nums = zip(strdec[::3],strdec[1::3],strdec[2::3]) print nums
Re: Fun with math: Dividing one by 998001 yields a surprising result
#9This can be seen in python with (I had to dig into the docs for this, so here are the fruits of my labor :) ) import decimal decimal.getcontext().prec=1000 dec = decimal.Decimal(1)/decimal.Decimal(998001) #now doctor it up to see the numbers strdec = str(dec)[2:] #chop off the '0.' nums = zip(strdec[::3],strdec[1::3],strdec[2::3]) print nums
I don't have a python shell available... what happens after 999?
Re: Fun with math: Dividing one by 998001 yields a surprising result
#10The link is blocked at my workplace. I really don't understand how their filter system works.