128-bit math is ... tricky. We implemented a 128-bit type for n-dimensional arrays to represent images in our #ImgLib2 library for image processing. So many gotchas in defining basic arithmetic operations; at some point in version history all our custom implementations were replaced by java's BigInteger's.
github.com/imglib/imglib2/blob…
Our motivating use case? Integral images (summed-area table: en.wikipedia.org/wiki/Summed-a… ). But now the 128-bit type has found other uses too.
imglib2/src/main/java/net/imglib2/type/numeric/integer/Unsigned128BitType.java at master · imglib/imglib2
A generic next-generation Java library for image processing - imglib/imglib2GitHub