js-cuint:JavaScript的C类无符号整数

时间:2021-05-11 13:05:50
【文件属性】:
文件名称:js-cuint:JavaScript的C类无符号整数
文件大小:39KB
文件格式:ZIP
更新时间:2021-05-11 13:05:50
JavaScript JavaScript的C类无符号整数 概要 Javascript本身不支持对无符号的32位或64位整数进行处理。 该库根据C行为提供了该功能,从而能够编写依赖于此的算法。 它在设计时就考虑到了性能,并尽力使其尽可能快。 任何改进都欢迎! 这个怎么运作 一个无符号的32位整数由一个对象表示,该对象的前16位(低位)和后16位(高位)。 然后,透明地执行所有对无符号整数支持的标准操作。 e.g. 10000010000100000100010000100010 (2182104098 or 0x82104422) is represented by: high=1000001000010000 low= 0100010000100010 注意如果发生溢出,则无符号整数将被截断为最低的32位(对于UINT32)或64位(对于UINT64)。 同样适用于64位整数,这些整数被分为4个16位整
【文件预览】:
js-cuint-master
----lib()
--------uint64.js(15KB)
--------uint32.js(10KB)
----build.js(577B)
----examples()
--------adding.js(175B)
--------dividing.js(174B)
--------uint32.html(573B)
----LICENSE(1023B)
----build()
--------uint32.min.js(3KB)
--------uint64.js(15KB)
--------uint64.min.js(6KB)
--------uint32.js(10KB)
----test()
--------UINT32_subtract-test.js(1KB)
--------UINT64_multiply-test.js(1KB)
--------UINT32_and-test.js(1KB)
--------UINT64_shiftLeft-test.js(1KB)
--------UINT64_add-test.js(2KB)
--------UINT64_xor-test.js(1KB)
--------UINT32_toNumber-test.js(1KB)
--------UINT32_xor-test.js(1KB)
--------UINT32_greaterThan-test.js(887B)
--------UINT32_rotateRight-test.js(892B)
--------UINT32_add-test.js(2KB)
--------UINT64_rotateRight-test.js(904B)
--------UINT32_multiply-test.js(1KB)
--------UINT64_greaterThan-test.js(887B)
--------UINT32_rotateLeft-test.js(887B)
--------UINT64_div-test.js(2KB)
--------UINT32_not-test.js(794B)
--------UINT64_not-test.js(860B)
--------UINT64_toString-test.js(1KB)
--------UINT64_shiftRight-test.js(2KB)
--------UINT32_lessThan-test.js(868B)
--------UINT32_negate-test.js(855B)
--------UINT64_equals-test.js(1004B)
--------UINT32_shiftRight-test.js(2KB)
--------UINT64_rotateLeft-test.js(899B)
--------UINT32_toString-test.js(1KB)
--------UINT64_subtract-test.js(1KB)
--------UINT64_lessThan-test.js(868B)
--------UINT32_shiftLeft-test.js(1KB)
--------UINT64-test.js(7KB)
--------UINT32_div-test.js(2KB)
--------UINT32-test.js(5KB)
--------UINT64_negate-test.js(855B)
--------UINT32_or-test.js(912B)
--------UINT32_equals-test.js(1004B)
--------UINT64_and-test.js(1KB)
--------UINT64_or-test.js(912B)
--------UINT64_toNumber-test.js(1KB)
----README.md(6KB)
----History.md(1KB)
----.gitignore(14B)
----index.js(81B)
----package.json(617B)

网友评论