function show(x) {
  document.write("<tr><td>" + x + "<td>" + -x);
}

document.write("<table border>");
document.write("<tr><td>X<td>-X");

show(123456789);
show(Math.pow(2,31)-1);
show(-Math.pow(2,31));

document.write("</table>");