a******g 发帖数: 320 | 1 Overflow like: Try to use an int32 type to represent a 64-bit integer. Is
there any command or easy way to judge this in C?
Thanks a lot!
Xuan |
z**e 发帖数: 2 | 2 http://lists.linux.org.au/archives/linuxcprogramming/2002-June/msg00028.html
【在 a******g 的大作中提到】 : Overflow like: Try to use an int32 type to represent a 64-bit integer. Is : there any command or easy way to judge this in C? : Thanks a lot! : Xuan
|
t*******l 发帖数: 3662 | 3 if your platform supports 64-bit integer,
and you only use int32 to store some final results, maybe
you can use your 64-bit int to do the calculation, and
then right-shifted 32 bit and check if it is zero before
assigning the value to your int32.
【在 a******g 的大作中提到】 : Overflow like: Try to use an int32 type to represent a 64-bit integer. Is : there any command or easy way to judge this in C? : Thanks a lot! : Xuan
|
g***p 发帖数: 139 | 4 google PCL(performance counter library) it will count how many overflows in
your subroutine?
【在 a******g 的大作中提到】 : Overflow like: Try to use an int32 type to represent a 64-bit integer. Is : there any command or easy way to judge this in C? : Thanks a lot! : Xuan
|