int128

Int128 in .Net?

I need to do some large integer math. Are there any classes or structs out there that represent a 128-bit integer and implement all of the usual operators? BTW, I realize that decimal can be used to represent a 96-bit int. ...

Arithmetic with IPv6 addresses (large integers)

I'm working with IPv6 addresses in the form: FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF:FFFF Internally, I store them in an array: TIp6Bytes = array [0..15] of Byte; I need to manipulate the IPv6 addresses in a number of ways including adding, dividing, multiplying etc. Can anyone suggest a good way to do this? I guess I should have mentio...

How can I use a custom type for keys in a boost::unordered_map?

I'm using Boost's implementation of a hash map in a project right now, and I'm trying to implement a custom type for keys. I have four unsigned integers which I'd like to combine into a single 128-bit datatype to use as a key. I've created a struct with a 32-bit integer array of four elements, which serves as my storage. To be honest, I...

C# Custom data type!

After I decided to implement my Int128 in C#, I thought it would be nice to make it look like other dotNet data types.. But I could not implement the following feature: suffix initialization: such as 13L and 0.2D Can I make my own suffix in C#? And if I can not.. how can I initialize it? i.e Int128 a= ?? ...