<?xml version="1.0" encoding="utf-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"><channel><title>MagicLen</title><link>https://magiclen.org/cn/tag/node-int32/</link><description>多元化原创文章，内容包罗万象，有编程语言、网站应用、软件介绍、硬件介绍、操作系统、旅行游记、专题采访、益智问题、文学创作，以及作者们的知识分享和作品分享。</description><language>zh-CN</language><lastBuildDate>Sun, 22 Nov 2026 18:26:37 +0800</lastBuildDate><atom:link href="https://magiclen.org/cn/tag/node-int32/feed/" rel="self" type="application/rss+xml"/><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>8</sy:updateFrequency><sy:updateBase>1970-01-01T00:00+00:00</sy:updateBase><item><title>使用 Node.js 进行 32 比特的有号整数运算</title><link>https://magiclen.org/cn/node-js-int32/</link><description><![CDATA[<img src="https://magiclen.org/wp-content/uploads/2017/08/nodejs-napi-220x162.png" srcset="https://magiclen.org/wp-content/uploads/2017/08/nodejs-napi-220x162.png 1x, https://magiclen.org/wp-content/uploads/2017/08/nodejs-napi-440x324.png 2x, https://magiclen.org/wp-content/uploads/2017/08/nodejs-napi-660x486.png 3x" alt>
在 Node.js 上要重现 32 比特有号整数运算的溢出并不容易，「Math.imul」只能处理乘法，网络上流传的「OR 一个 0」作法也常会算错。这篇文章会说明这些问题，并介绍使用 Rust 原生的「i32」和「u32」类型开发的「int32」模块。]]></description><category>Rust</category><category>JavaScript</category><category>C/C++</category><category>JavaScript</category><category>node.js</category><category>Node-API</category><category>Rust</category><category>TypeScript</category><category>node-int32</category><guid>https://magiclen.org/cn/node-js-int32</guid><pubDate>Wed, 9 Aug 2017 09:00:26 +0800</pubDate><dc:creator>Magic Len</dc:creator></item></channel></rss>