Skip welcome & menu and move to editor
Welcome to JS Bin
Load cached copy from
 
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>JS Bin</title>
</head>
<body>
</body>
</html>
 
var result = (function() {
   // the largest safe integral value:
   console.log(Number.MAX_SAFE_INTEGER); // 9007199254740991
   
  // which is one less than:
  console.log(Math.pow(2,53)); 9007199254740992
  
  // since the largest number is a 64-bit floating point, precision is lost after the maxinum:
  console.log(Math.pow(2,53) + 1); // 9007199254740992
    
  return Math.pow(2,53) === (Math.pow(2,53) + 1);
})();
console.log(result); // true
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
miguelmotapro
0viewers