Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我知道 Erlang 有任意大小的整数,但是标准实现之一有最大限制吗?如果是这样,是什么?
Erlang 使用bignum 算法,而 Erlang 中的整数受机器上可用内存的限制。实际上,在 Erlang 中 Integer 的大小没有限制。看看这个文档:http ://erlang.org/doc/efficiency_guide/advanced.html 它对限制有更详细的解释。
在 32 位架构上:-134217729 < i < 134217728(28 位)。
-134217729 < i < 134217728
在 64 位架构上:-576460752303423489 < i < 576460752303423488(60 位)。
-576460752303423489 < i < 576460752303423488