Force cast BigInteger to Double if it's less than Double.MAX_VALUE