Skip to content

Commit

Permalink
Update powers-of-2.html
Browse files Browse the repository at this point in the history
  • Loading branch information
mcnole25 authored Sep 6, 2024
1 parent 2346a67 commit 4ed8590
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions powers-of-2.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,8 @@ <h1>Powers of 2 Calculator</h1>
result.innerHTML = (2 ** x).toFixed(100).replace(/(\.0+|0+)$/, "");
} else {
powerOf.innerHTML = "2<sup>" + x + "</sup> (" + Math.floor(Math.log10(2) * x + 1) + " digit/s)";
if (x > 300) {
result.innerHTML = BigInt(2 ** 300) * 2n ** BigInt(x - 300);
} else {
result.innerHTML = (2 ** x).toPrecision(100).replace(/(\.0+|0+)$/, "");
}}});
}});
</script>
</body>
</html>

0 comments on commit 4ed8590

Please sign in to comment.