64 bit integers in C

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

64 bit integers in C

1,381 Views
GD
Contributor I
I need to calculate 32*16 bit integer multiplication whete result may get longer than 32 bits. Is it possible to do 64 bit math in 56800E C compiler? In gcc type 'long long' equals 64 bit integer but is there equivalent in CW?

I also would be happy if result would saturate to 32 bits. How does saturation logic work in C? I haven't seen much documentation about it.

I'm using 56F8322 and CW 8.0.
Labels (1)
0 Kudos
1 Reply

309 Views
pittbull
Contributor III
Hello,
I don't believe that CW has built-in support for extended integers, but you can easily write it yourself. Download this book: http://www.esnips.com/doc/9f6939e0-2f38-4b7c-bf73-2db477f3d000
It is full of tricky and speed optimized algorithms and I'm sure it helps solving your problem...
0 Kudos