handle long values correctly to prevent integer overflow
mark Long.MIN/MAX as "n/a" in output