<p dir="auto">Unzip the arm prebuilt on arm linux system. Ran all Math functions and the results are shown here. The functions in red return incorrect results. We've noticed this issue all the way back to 0.32.x. 0.29.2 does not have these issues.</p>
<p dir="auto"><a target="_blank" rel="noopener noreferrer nofollow" href="https://cloud.githubusercontent.com/assets/1995486/12953782/e784561a-cfe9-11e5-9a3a-ad0e98a8020d.png"><img src="https://cloud.githubusercontent.com/assets/1995486/12953782/e784561a-cfe9-11e5-9a3a-ad0e98a8020d.png" alt="image" style="max-width: 100%;"></a></p>
<p dir="auto">I'm using this electron: <a href="https://github.com/atom/electron/releases/download/v0.35.4/electron-v0.35.4-linux-arm.zip">https://github.com/atom/electron/releases/download/v0.35.4/electron-v0.35.4-linux-arm.zip</a></p>
<p dir="auto"><a href="https://github.com/dcodeIO/long.js">Long.js</a> library returns different result on Raspberry Pi 2 for the following <a href="https://github.com/bartekn/electron-long-bug/blob/master/resources/app/index.html#L10">js code</a>:</p>
<div class="highlight highlight-source-js notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="Long.fromString(&quot;13370000000&quot;).toString()"><pre class="notranslate"><span class="pl-v">Long</span><span class="pl-kos">.</span><span class="pl-en">fromString</span><span class="pl-kos">(</span><span class="pl-s">"13370000000"</span><span class="pl-kos">)</span><span class="pl-kos">.</span><span class="pl-en">toString</span><span class="pl-kos">(</span><span class="pl-kos">)</span></pre></div>
<p dir="auto">I've created proof-of-concept repo here: <a href="https://github.com/bartekn/electron-long-bug">https://github.com/bartekn/electron-long-bug</a>.</p>
<p dir="auto">The problem seems to be connected with <a href="https://github.com/bartekn/electron-long-bug/blob/master/resources/app/node_modules/long/dist/Long.js#L178">this line</a> in Long.js:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="return new Long((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);"><pre class="notranslate"><code class="notranslate">return new Long((value % TWO_PWR_32_DBL) | 0, (value / TWO_PWR_32_DBL) | 0, unsigned);
</code></pre></div>
<p dir="auto">When value of <code class="notranslate">value</code> variable is equal <code class="notranslate">13370000000</code>, the first value passed to <code class="notranslate">Long</code> constructor (<code class="notranslate">(value % TWO_PWR_32_DBL) | 0</code>) is equal <code class="notranslate">0</code> on Raspberry Pi, while it's equal <code class="notranslate">485098112</code> on Mac OS (the correct value).</p>
<p dir="auto">When trying to calculate <code class="notranslate">13370000000%4294967296</code> (<code class="notranslate">TWO_PWR_32_DBL</code>=4294967296) in the chrome dev tools console on Raspberry Pi 2 it returns correct result (<code class="notranslate">485098112</code>).</p>
<p dir="auto">I'm not sure if it's a problem of electron or libchromiumcontent, sorry.</p>