I am using an older version of the compiler: v3.249
I believe I may have found a bug, which may have actually been corrected in recent releases, but I don't want to pay for the upgrade unless I am sure that it will resolve the issue. When I multiple a signed int16 (long) with a value of -1 (65535) by a constant, the result is not what I am expecting.
Code:
void main()
{
signed long i=-1;
signed long r=0;
r = i * 1000; // result should be -1000
// but I get -744, which is 256 too low
}
I have tried performing the calculation by hand and truncating the 32bit result with no success in finding the source of the error. Can someone try this on a more recent version of the compiler to confirm that this issue has been addressed already?
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum