Can't compare bigger numbers?

Report problems with documented functionality
rajat
Posts: 8
Joined: 07 Feb 2014, 13:35

Can't compare bigger numbers?

23 Dec 2014, 18:11

Took me an hour to debug my script which came down to this.
Is this supposed to happen? :wtf:

Code: Select all

a = 61299994817820020404
b = 61299994817820020183
if a = %b%
	msgbox how are these two same?`n`n%a%`n%b%
I can of course add a letter to each variable's contents, compare and then remove - but seriously is that the best way? :thumbdown:
lexikos
Posts: 9621
Joined: 30 Sep 2013, 04:07
Contact:

Re: Can't compare bigger numbers?

23 Dec 2014, 18:17

Commands, functions, and expressions that accept numeric inputs generally support 15 digits of precision for floating point values. For integers, 64-bit signed values are supported, which range from -9223372036854775808 (-0x8000000000000000) to 9223372036854775807 (0x7FFFFFFFFFFFFFFF). Any integer constants outside this range are not supported and might yield inconsistent results. By contrast, arithmetic operations on integers wrap around upon overflow (e.g. 0x7FFFFFFFFFFFFFFF + 1 = -0x8000000000000000).
rajat
Posts: 8
Joined: 07 Feb 2014, 13:35

Re: Can't compare bigger numbers?

23 Dec 2014, 18:22

Oh well, then I was looking for this information with the wrong keywords. Before posting I did a search for 'maximum' and 'length' in the help file, but didn't come up with the text you posted. :facepalm:
Thank you for the quick reply though.
Guest

Re: Can't compare bigger numbers?

23 Dec 2014, 18:58

lexikos wrote:It's under Variable Capacity and Memory.
Yes, after your last post I searched for the text you posted and found it in the manual. I meant I just didn't look in the right place before creating this thread.
Thanks again :)

Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 20 guests