Elnaz
Newbie level 5
Hi all,
In order to calculate the absolute value of a number in fixed-point, I'm doing num = num & ~(1<<BP) where num is a 64 bit signed fixed-point value (32 integer bits plus 32 fractional bits) and BP is the wordlength=64. But running the C code in VS 2010 I end up getting the same negative number. Theoritically it should work, right? but, it doesn't!
Thanks
Elnaz
In order to calculate the absolute value of a number in fixed-point, I'm doing num = num & ~(1<<BP) where num is a 64 bit signed fixed-point value (32 integer bits plus 32 fractional bits) and BP is the wordlength=64. But running the C code in VS 2010 I end up getting the same negative number. Theoritically it should work, right? but, it doesn't!
Thanks
Elnaz