Javascript中的原生64位整数

编程入门 行业动态 更新时间:2024-10-26 00:24:31
本文介绍了Javascript中的原生64位整数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

似乎即使是最新的 Ecmascript 8 不支持64位整数。

It seems that even the newest Ecmascript 8 has no support for 64bit integers.

目前我们必须使用库,例如​​很长或 UInt64 或 Closure Library 。

Currently we have to use libraries, like Long or UInt64 or Closure Library.

技术上是否可以在Javascript中为64位整数添加本机支持?

Is it technically possible to add native support for 64bit integers in Javascript?

推荐答案

是的,确实如此。有一个第3阶段 提议用于任意bigints(包括足以允许实现专门用于固定的64位使用),所以它实际上只是等待实现和测试。因此,可以得出结论,这在技术上是可行的。

Yes, it is. There's a stage 3 proposal for arbitrary-bigints (including enough to allow implementations to specialize fixed 64-bit use), so it's literally just waiting for implementations and tests at this point. Therefore, one can conclude that it's technically possible.

更多推荐

Javascript中的原生64位整数

本文发布于:2023-11-30 05:41:26,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1648915.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:整数   Javascript

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!