Jump to content
Sign in to follow this  
chronicsilence

Large number representation logic failure

Recommended Posts

To make this succinct:

_number = 90984112; systemChat str (_number == _number - 1); // prints out "true"

I'm scripting a mission that requires large number representation, and I'm running into this nightmare. Even a signed 32-bit integer can handle a positive value of over 2 billion, but this can't seem to handle anything over 16777298. I guess it's using 24-bit representation?

Does anyone know of a way to use numbers larger than 16,777,298 and not have it lose precision?

Share this post


Link to post
Share on other sites

Thanks for the link, I assume that function is probably very similar to BIS_fnc_numberText. Even with his function though, it looks like there's no way to keep precision above 10^7 because the internal scalar representation itself loses the precision.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×