TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Tiny Simple Hash – Passes Dieharder, SMHasher and PractRand

3 点作者 slowenough超过 5 年前

1 comment

slowenough超过 5 年前
The round function is just 4 SLOC:<p><pre><code> function q( state, val, numerator, denominator ) { &#x2F;&#x2F; Continued Fraction mixed with Egyptian fraction &quot;Continued Egyptian Fraction&quot; &#x2F;&#x2F; with denominator = val + pos &#x2F; state[1] state[0] += numerator &#x2F; denominator; state[0] = 1.0 &#x2F; state[0]; &#x2F;&#x2F; Standard Continued Fraction with a_i = val, b_i = (a_i-1) + i + 1 state[1] += val; state[1] = numerator &#x2F; state[1]; }</code></pre>