- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As a non-standard extension, both GCC and Clang provide __uint128_t and __int128_t for emulated 128-bit integer arithmetic in C. The basic arithmetic operations +, -, *, /, %, as well as bitwise operations work on these datatypes in the same fashion as normal integers, and performance is quite good. I'm wondering (1) if there are any equivalent datatypes supported by ICC and (2) if there are plans to include anything similar in ICC.
I also posted this question on Stack Overflow: http://stackoverflow.com/questions/16365840/128-bit-integers-supporting-and-in-the-intel-c-compiler
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
http://homepages.ihug.co.nz/~aurora76/Malc/Useful_Classes.htm
See bigint.h link on above page.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, it's true that there are libraries to do high-precision arithmetic and some of these are efficient for "smaller" widths like 128-bits. That class you linked to might be a candidate if I were using C++ instead of C. Does it overload the built-in operators like +, -, *, /, and %? I get the impression that this int128 class does just that (again, C++ only): http://mx-3.cz/tringi/www/int128
Unfortunately C doesn't have overloading so no such library exists for C.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page