Jump to content
bull_a

Numeric Scientific Notation Rounding Issue

Recommended Posts

Hi all,

 

as it's already known, large numbers in Arma use scientific notation, I believe this happens when the numeric becomes longer than 7 digits. I am trying to output a numeric to screen which has a length of 11 digits.

 

The number is 12345678912

  • Twelve billion, three hundred and forty-five million, six hundred and seventy-eight thousand, nine hundred and twelve
  • 12,345,678,912
  • 1.23457e+010

 

So storing the variable is not a problem, the database has been setup to accept integers with a length of 20, however, the problems start to arise when attempting to convert to a string and when attempting to compare and contrast similar numbers (i.e. are extremely close together).

 

An example of this can be seen below

_bool = 12345678912 < 12345678913;
// _bool is returned as false 

This is a problem with rounding when using scientific notation and unfortunately this cannot be worked around (as far as I know).

 

Does anyone have a solution or a link to some documentation I could look at? Any help is appreciated.

 

 

Thanks,

Bull

 

Share this post


Link to post
Share on other sites

Thanks Greenfist, this was one of the ways we investigate! Seems that, as always, this is going to be more hassle than it's worth :)

  • Like 1

Share this post


Link to post
Share on other sites

Thanks Greenfist, this was one of the ways we investigate! Seems that, as always, this is going to be more hassle than it's worth :)

 

Arma in a nutshell...

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

×