Translating code with floats or doubles to fixed-point arithmetic can be fraught with tricky corner cases, as bit-width limits can generate even more-complex limits for operands. Andres Takach describes the Algorithmic C datatypes, a freely available C++ library that provides arbitrary-length integer and fixed-point types.