Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how to print pi in a better way? also why does it keep saying my title isnt specific?

idk i get bored and try stuff, one of the stuff was trying to print pi, i did this by doing

print(math.rad(180))

and like it didnt work very well. cuz like it only printed 3.141592653598 and i believe pi has a bit more numbers than that(thats sarcasm if you cant tell) but yea. idk i wanted like my entire dev console to be filled with numbers

3 answers

✓ Accepted answer

The reason for the lack of a large series of numbers is the fact that computers operate on a system of 1s and 0s. Generally the max amount of bits is eight or sixteen. This means that numbers are represented in eight bit as 11111111 or 00000000 or some combination thereof. This means that numbers can only go so far in their length. There is function called math.pi if you are looking for another way to get pi. More on this here if you are interested. Have a great day scripting!

2 comments

1

I don't think math.pi is a function.

1

64 bits is the highest they can go nowadays. 32 bit machines can still handle 64 bit numbers, but it takes a lot more time to deal with them, so I would assume that, if you really wanted to, you could use 128 bit numbers on x64, it would just be really slow.

If you just want to print pi, having it fill your dev console, but don't actually want to do math with it, then you could try going to https://www.piday.org/million/, copy as much pi as you like, and paste it into string form in a print function.

This discussion is preserved as it was. New answers, comments, and votes are closed.