javadoc comments

fix bug casting a NaN to a long