Baseline Widely available
BigInt.asUintN
éçã¡ã½ããã¯ã BigInt å¤ã符å·ãªãæ´æ°ã«ä¸¸ãããã®å¤ãè¿ãã¾ãã
const U64_CEIL = 2n ** 64n;
console.log(BigInt.asUintN(64, U64_CEIL - 1n));
// 18446744073709551615n (2n ** 64n - 1n, the maximum non-wrapping value)
console.log(BigInt.asUintN(64, U64_CEIL));
// 0n (wraps to zero)
console.log(BigInt.asUintN(64, U64_CEIL + 1n));
// 1n
console.log(BigInt.asUintN(64, U64_CEIL * 2n));
// 0n (wraps on multiples)
console.log(BigInt.asUintN(64, U64_CEIL * -42n));
// 0n (also wraps on negative multiples)
æ§æ
BigInt.asUintN(bits, bigint);
弿°
bits
æ´æ°ã®å¤§ããã®ããã«å©ç¨ã§ãããããæ°ã
bigint
æå®ããããããæ°ã«åãããã丸ããæ´æ°å¤ã
bigint
ã 2^bits
ã§å²ã£ãå°ä½ã®å¤ã®ç¬¦å·ãªãæ´æ°ã§ãã
BigInt.asUintN()
ã¡ã½ããã¯ã64ãããã®æ°å¤ã®ç¯å²ã«åããã®ã«ä¾¿å©ã§ãã
const max = 2n ** 64n - 1n;
BigInt.asUintN(64, max);
// ⪠18446744073709551615n
BigInt.asUintN(64, max + 1n);
// ⪠0n
// ãªã¼ãã¼ããã¼ããã®ã§ã¼ãã«ãªã
仿§æ¸ ãã©ã¦ã¶ã¼ã®äºææ§ é¢é£æ
å ±
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4