Find max integer size that a floating point type can handle without loss of precision
- by Checkers
Double has range more than a 64-bit integer, but its precision is less dues to its representation (since double is 64-bit as well, it can't fit more actual values). So, when representing larger integers, you start to lose precision in the integer part.
#include <boost/cstdint.hpp>
#include <limits>
template<typename T, typename…