Page 1 of 1

Can't compare bigger numbers?

Posted: 23 Dec 2014, 18:11
by rajat
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:

Re: Can't compare bigger numbers?

Posted: 23 Dec 2014, 18:17
by lexikos
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).

Re: Can't compare bigger numbers?

Posted: 23 Dec 2014, 18:22
by rajat
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.

Re: Can't compare bigger numbers?

Posted: 23 Dec 2014, 18:52
by lexikos

Re: Can't compare bigger numbers?

Posted: 23 Dec 2014, 18:58
by Guest
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 :)