27.11.11

Java’s missing unsigned integer types | Javalobby

Java’s missing unsigned integer types | Javalobby
Is there a Java library for unsigned number type wrappers? - Stack Overflow
Primitives - Apache Commons Primitives

All this is unnecessary if you do the calculations using the next-bigger signed type and cut off the upper part


long x=42, y, m=5, t=18
y = (x*m + t) & 0xFFFFFFFF;

.. emulating them in Java with wrapper types would have been more problematic than dealing with the problem directly on each single occasion.


No comments: