64 bit integers in C

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

64 bit integers in C

1,392件の閲覧回数
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.
ラベル(1)
0 件の賞賛
1 返信

320件の閲覧回数
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 件の賞賛