diff options
Diffstat (limited to 'files/zh-cn/web/javascript/reference/global_objects/bigint')
3 files changed, 8 insertions, 8 deletions
diff --git a/files/zh-cn/web/javascript/reference/global_objects/bigint/asintn/index.html b/files/zh-cn/web/javascript/reference/global_objects/bigint/asintn/index.html index cab753a464..da27bcf501 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/bigint/asintn/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/bigint/asintn/index.html @@ -5,7 +5,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/BigInt/asIntN --- <div>{{JSRef}}</div> -<p><strong><code>BigInt.asIntN</code></strong> 静态方法将 <code>BigInt</code> 值转换为一个 -<code>2<sup>width-1</sup></code> 与 <code>2<sup>width-1</sup>-1</code> 之间的有符号整数。</p> +<p><strong><code>BigInt.asIntN</code></strong> 静态方法将 <code>BigInt</code> 值转换为一个 -<code>2^(width-1)</code> 与 <code>2^(width-1)-1</code> 之间的有符号整数。</p> <div>{{EmbedInteractiveExample("pages/js/bigint-asintn.html")}}</div> @@ -26,7 +26,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/BigInt/asIntN <h3 id="返回值">返回值</h3> -<p><code>bigint</code> 模(modulo) 2<sup><code>width</code></sup> 作为有符号整数的值。</p> +<p><code>bigint</code> 模(modulo) <code>2^width</code> 作为有符号整数的值。</p> <h2 id="例子">例子</h2> diff --git a/files/zh-cn/web/javascript/reference/global_objects/bigint/asuintn/index.html b/files/zh-cn/web/javascript/reference/global_objects/bigint/asuintn/index.html index 2c813a51ad..e313871d36 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/bigint/asuintn/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/bigint/asuintn/index.html @@ -5,7 +5,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/BigInt/asUintN --- <div>{{JSRef}}</div> -<p><strong><code>BigInt.asUintN</code></strong> 静态方法将 <code>BigInt</code> 转换为一个 0 和 2<sup>width</sup>-1 之间的无符号整数。</p> +<p><strong><code>BigInt.asUintN</code></strong> 静态方法将 <code>BigInt</code> 转换为一个 0 和 2^width-1 之间的无符号整数。</p> <div>{{EmbedInteractiveExample("pages/js/bigint-asuintn.html")}}</div> @@ -26,7 +26,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/BigInt/asUintN <h3 id="返回值">返回值</h3> -<p><code>bigint</code> 模(modulo) 2<sup><code>width</code></sup> 作为无符号整数的值。</p> +<p><code>bigint</code> 模(modulo) <code>2^width</code> 作为无符号整数的值。</p> <h2 id="例子">例子</h2> diff --git a/files/zh-cn/web/javascript/reference/global_objects/bigint/index.html b/files/zh-cn/web/javascript/reference/global_objects/bigint/index.html index 5f625f83ad..9e52874364 100644 --- a/files/zh-cn/web/javascript/reference/global_objects/bigint/index.html +++ b/files/zh-cn/web/javascript/reference/global_objects/bigint/index.html @@ -5,7 +5,7 @@ translation_of: Web/JavaScript/Reference/Global_Objects/BigInt --- <p>{{JSRef}}</p> -<p><strong><code>BigInt</code></strong> 是一种内置对象,它提供了一种方法来表示大于 <code>2<sup>53 </sup>- 1</code> 的整数。这原本是 Javascript中可以用 {{JSxRef("Number")}} 表示的最大数字。<strong><code>BigInt</code></strong> 可以表示任意大的整数。</p> +<p><strong><code>BigInt</code></strong> 是一种内置对象,它提供了一种方法来表示大于 <code>2^53 - 1</code> 的整数。这原本是 Javascript中可以用 {{JSxRef("Number")}} 表示的最大数字。<strong><code>BigInt</code></strong> 可以表示任意大的整数。</p> <dl> </dl> @@ -169,9 +169,9 @@ Boolean(12n) <dl> <dt>{{JSxRef("BigInt.asIntN()")}}</dt> - <dd>将 BigInt 值转换为一个 -2<sup>width-1</sup> 与 2<sup>width-1</sup>-1 之间的有符号整数。</dd> + <dd>将 BigInt 值转换为一个 -2^(width-1) 与 2^(width-1) - 1 之间的有符号整数。</dd> <dt>{{JSxRef("BigInt.asUintN()")}}</dt> - <dd>将一个 BigInt 值转换为 0 与 2<sup>width</sup>-1 之间的无符号整数。</dd> + <dd>将一个 BigInt 值转换为 0 与 2^(width) - 1 之间的无符号整数。</dd> </dl> <h2 id="实例方法">实例方法</h2> @@ -189,7 +189,7 @@ Boolean(12n) <h3 id="转化">转化</h3> -<p>由于在 {{JSxRef("Number")}} 与 <code>BigInt</code> 之间进行转换会损失精度,因而建议仅在值可能大于2<sup>53</sup> 时使用 <code>BigInt</code> 类型,并且不在两种类型之间进行相互转换。</p> +<p>由于在 {{JSxRef("Number")}} 与 <code>BigInt</code> 之间进行转换会损失精度,因而建议仅在值可能大于2^53 时使用 <code>BigInt</code> 类型,并且不在两种类型之间进行相互转换。</p> <h3 id="密码学">密码学</h3> |