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

Roblox maths different to .NET maths?

I'm making a program that sends numbers between the roblox client and a C# application but somewhere the numbers are going wrong.  Could someone help explain to me what might be happening? My guess is floating point errors, 0.999 instead of 1.

4 comments

0

atleast show us the script or we won't know where to begin looking

0

How are you even getting a Roblox client to communicate with C#?

0

also yeah its prob floating point errors, its a problem with lua

0

@RobloxWhizYT You can use http requests to send data to a database and the have the C# application access the database.

1 answer

✓ Accepted answer

Lua 5.1 only uses doubles, not integers; it has less precision than BigInteger. You can test this out:

print(2^53 + 1 == 2^53) -- true

1 comment

0

Thank you for the telling me this :)

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