Posted 04 November 2012 - 08:17 AM
Hello everyone! As the math geek I am, I was playing around with the famous 1/998001 fraction. For those of you who don't know, it will return a endless list of all 3 digit numbers, and when it reach 999 it will start over at 000 again etc. So I wanted to make a program and see if I could make that program to atleast print out 1 series of this. though I noticed lua returns 1.002003E-6
So my question is, how does lua answer to infinite numbers and why is this?
Here's my program btw:
So my question is, how does lua answer to infinite numbers and why is this?
Here's my program btw:
test = 1/998001
tostring(test)
string.sub(test, 1, 51)
print(test)