This is not a bug per se, because as far as mIRC is concerned, those numbers are in fact the same. Internally, mIRC stores numbers as IEEE745 64-bit floating point numbers ("doubles"), which are supported natively by your CPU, but allow accurate representation of integers "only" up to 2**53, which your examples exceed. This limitation can be found throughout all parts of mIRC that involves parsing strings as numbers. A simple example is $calc: $calc(225559219690881181) and $calc(225559219690881185) both return 225559219690881180.

mIRC could implement support for arbitrary-precision numbers, but this would come at the cost of performance for pretty much everything involving numbers. Alternatively, you as a scripter can work around some of these issues. In your use case, you can force mIRC to not interpret such strings as numbers, e.g. by prefixing them with some text:

Code:
var %num1 = 225559219690881181, %num2 = 225559219690881185
echo -ag $iif(%num1 == %num2,It's a match!,Doesn't match!)
echo -ag $iif(x $+ %num1 == x $+ %num2,It's a match!,Doesn't match!)


Saturn, QuakeNet staff