提交 442dacae 编写于 作者: D DCloud_LXH

Merge branch 'master' of gitcode.net:dcloud/unidocs-zh; branch 'master' of...

Merge branch 'master' of gitcode.net:dcloud/unidocs-zh; branch 'master' of github.com:dcloudio/unidocs-zh
......@@ -181,9 +181,9 @@ let b = new Double(a) // 将整型变量 a 转换为 Double 类型
#### number的边界说明
- 在不同平台上,数值的范围限制不同,超出限制会导致相应的错误或异常
* 编译至 JavaScript 平台时,最大值为 1.7976931348623157e+308,最小值为 -1.7976931348623157e+308,超出限制会返回 `Infinity``-Infinity`
* 编译至 Kotlin 平台时,最大值为 9223372036854775807,最小值为 -9223372036854775808,超出限制会报错:`The value is out of range‌`
* 编译至 Swift 平台时,最大值 9223372036854775807,最小值 -9223372036854775808,超出限制会报错:`integer literal overflows when stored into Int`
* 编译至 JavaScript 平台时,数值范围为 ±1.7976931348623157e+308,超出范围会返回 `Infinity``-Infinity`
* 编译至 Kotlin 平台时,整型的数值范围为 -9223372036854775808 到 9223372036854775807,超出范围会报错:`The value is out of range‌`。浮点型的数值范围为 ±1.7976931348623157e+308,超出范围会返回 `Infinity``-Infinity`。平台专有数字类型范围 [详见](#Kotlin)
* 编译至 Swift 平台时,整型的数值范围为 -9223372036854775808 到 9223372036854775807,浮点型的数值范围为 ±1.7976931348623157e+308,超出范围会报错:`integer literal overflows when stored into 'NSNumber'`。平台专有数字类型范围 [详见](#Swift)
#### 更多API
number内置对象有不少API,[详见](buildin-object-api/number.md)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册