Hi. I would like to know how to get a lot of digits of Pi into a ROBLOX game, but I don’t know how. By a lot, I mean in the millions of digits, specifically as a string and not an actual number. A user called genzgames pulled this off a while back in his “One Million Digits of Pi Obby” (One Million Digits of Pi Obby - Roblox). Is there any explanation for how to get it that precise?
I believe he used httpservice to get the numbers from a website. I tried printing it with that method but it said inf since it was over the 308 digit limit.
Sorry if it seems like I’m asking for a lot but something to point me in the right direction would help. I’m not asking for whole scripts. Thanks.
I found this file online that seems to contain all 1 million digits of PI.
-- I wouldn't recommend trying this in the command bar
local digits = game:GetService("HttpService"):GetAsync("https://www.angio.net/pi/digits/pi1000000.txt")
print(#digits)
print(string.format("%.99f",math.pi)) -- highest decimal you can get
-- Result : 3.141592653589793115997963468544185161590576171875000000000000000000000000000000000000000000000000000