So, as far as I know
When printing math.pi it justs prints this numbers: 3.1415926535898
I was wondering, if it was ‘precise’ the number pi?
Or it justs that number?
Or it prints that to prevent printing a big number?
Because, I mean this are the first 1001 characters of number pi as far as I know
It’s as printed, you would need to define it as that if you wanted greater precision. I’m unsure as to why you would need that in any practical situation though
The number can only be as precise as a double can be. In this case, math.pi appears to be 3.141592653589793. Any more decimals will not make a difference.
Roblox automatically rounds printed numbers to around the nearest 15th digit (I believe) unless manually formatted.
print(string.format("%.55f", math.pi))
Using this line of code, you can round pi to the nearest 55th decimal point. The received output is 3.1415926535897931159979634685441851615905761718750000000.
It seems that math.pi is rounded to the nearest 48th decimal place, which as you’ve already stated adds a level of precision that isn’t necessarily important.