Sign in

Marc B. Reynolds

@marc-b-reynolds.bsky.social
131 followers 54 following 100 posts

marc-b-reynolds.github.io mastodon.gamedev.place/@mbr

PostsRepliesMedia
Marc B. Reynolds @marc-b-reynolds.bsky.social · 17/09/2026
A "batteries include" routine for testing if a 32-bit integer is prime (from the referenced 2015 paper): After trial divisions, hash 'n', table lookup and 1 Miller-Rabin step (which I'm doing in Montgomery form). gist.github.com/Marc-B-Reyno...
gist.github.com
test is a unsigned 32-bit integer is prime
test is a unsigned 32-bit integer is prime. GitHub Gist: instantly share code, notes, and snippets.
000
Marc B. Reynolds @marc-b-reynolds.bsky.social · 17/09/2026
I ran across a paper with some rabbit-holes that I dodged from exploring but might be of interest to somebody. 3.6 has some equivalence between Montgomery & Barrett multiplication. And section 5 has some new modular reduction representation "Plantard". eprint.iacr.org/2026/1743
eprint.iacr.org
Notes on Short-Limb Modular Multiplication Techniques: Barrett, Montgomery, Plantard, and the Explicit CRT
This note collects, in compressed form, some techniques for modular multiplication with word-size (“short-limb”), or at most a-handful-of-words sized moduli as they are used in implementations of latt...
000
Marc B. Reynolds @marc-b-reynolds.bsky.social · 08/09/2026
Jeffrey Hurchalla has a series of post on some Montgomery form tricks. TL;DR: modified REDC in first, specialized REDC for small (WRT bit-width) in second, & ab+c & ab-c in third. First link: jeffhurchalla.com/2022/04/28/m...
jeffhurchalla.com
Montgomery REDC using the positive inverse (mod R)
This is Part 1 in a planned three part series on Montgomery arithmetic. A few days ago, Part 0 (the prequel?) showed how best to calculate the multiplicative inverse. If you would like an excellent…
001
Marc B. Reynolds @marc-b-reynolds.bsky.social · 12/08/2026
vitaut.net/posts/2026/y...
vitaut.net
The fastest double-to-string algorithm you’ve never heard of
022
Marc B. Reynolds @marc-b-reynolds.bsky.social · 10/08/2026
A post in which I claim it's no work at all to perform integer division in floating point. marc-b-reynolds.github.io/math/2026/08... #floatingpoint #optimization
code snippet from linked blog post
194
Reposted by Marc B. Reynolds
mmalex @mmalex.bsky.social · 25/06/2026
inspired by @boggo.bsky.social 's fluff which uses atomic-max points scattered by a DoF circle of confusion to do stylised bokeh blur, I tried implementing the awesome recent paper jorisar.nl/gaussian_poi... by @momentsingraphics.bsky.social et al and it works well enough to be fun!
27114
Marc B. Reynolds @marc-b-reynolds.bsky.social · 05/06/2026
mimicking function overloading in C with a single (unnested) _Generic per (cause I'm wasting time and do crime) godbolt.org/z/a6G5esY1o
godbolt.org
Compiler Explorer - C (x86-64 gcc 16.1)
//──────────────────────────────────────────────────────────────────────────────────── // scaffolding macros. limited argcount based (up to 8) version #define CAT2(A,B) A##B // mini argcount based m...
010
Marc B. Reynolds @marc-b-reynolds.bsky.social · 06/05/2026
marc-b-reynolds.github.io/math/2026/05...
marc-b-reynolds.github.io
A normal/twist transform for TBN representation
Covers a transform that converts the tangent and bitangent of a 3D frame to a point on the unit circle.
021
Reposted by Marc B. Reynolds
Ignacio Castano @icastano.bsky.social · 05/02/2026
While working on spark.js, I realized that common normal map compression formats weren’t supported in popular frameworks like three.js. I added the necessary support to three.js and wrote an article to shed some light on the topic: ludicon.com/castano/blog... #webgpu #webgl #threejs #sparkjs
ludicon.com
Normal Map Compression Revisited – Ignacio Castaño
01711
Marc B. Reynolds @marc-b-reynolds.bsky.social · 31/01/2026
Black-box (hardware ops) inverse CRC32C for Intel and NEON. gcc.godbolt.org/z/jK8djfxhE Prompted by a Pete Cawley post (1) and some recent comments on a 32-bit CRC base hash structure I tossed out a few years back (2) 1) www.corsix.org/content/my-f... 2) github.com/skeeto/hash-...
gcc.godbolt.org
Compiler Explorer - C++
// CRC32C hardware inverse #if defined(__ARM_ARCH) #if defined(__ARM_FEATURE_CRC32) && defined(__ARM_FEATURE_CRYPTO) static inline uint32_t crc32c(uint32_t x, uint32_t k) { return __crc32cw(...
010
Marc B. Reynolds @marc-b-reynolds.bsky.social · 22/05/2025
fgiesen.wordpress.com/2025/05/21/o...
fgiesen.wordpress.com
Oodle 2.9.14 and Intel 13th/14th gen CPUs
There’s a hardware problem affecting Intel 13th/14th gen CPUs, mostly desktop ones. This made the rounds through the press last year and has been on forums etc. for much longer than that. For…
020
Marc B. Reynolds @marc-b-reynolds.bsky.social · 09/05/2025
Stefan Gustavson has put out an open access book on procgen textures. liu.diva-portal.org/smash/record... github.com/stegu/noisei...
liu.diva-portal.org
Noise is Beautiful: Part 1: Procedural textures
043
Marc B. Reynolds @marc-b-reynolds.bsky.social · 31/03/2025
A test driver that demos "xoroshiro128+" failing PractRand in under 10 seconds. Nothing special here so this is a bit surprising to me. gist.github.com/Marc-B-Reyno...
gist.github.com
test driver that demos "xoroshiro128+" failing PractRand
test driver that demos "xoroshiro128+" failing PractRand - test.c
020
Marc B. Reynolds @marc-b-reynolds.bsky.social · 08/02/2025
Previously mentioned Hastings 1955 #approximation and remembered I have #sollya files for some. This is the first few atan approximations. I'm sharing because it's an example of using a "seed" approximation to refine the coefficients using sollya. gist.github.com/Marc-B-Reyno...
gist.github.com
Using sollya to "repeat" Cecil Hastings' 1955 approximations for atan. Works as an example of using a 'seed' approximation & using sollya to refine.
Using sollya to "repeat" Cecil Hastings' 1955 approximations for atan. Works as an example of using a 'seed' approximation & using sollya to refine. - hastings_atan.sollya
120
Marc B. Reynolds @marc-b-reynolds.bsky.social · 08/02/2025
Another #FloatingPoint refinement of pair arithmetic. This time on the so-called "sloppy add" arxiv.org/abs/2404.05948 AFIK: latest refinement of the accurate building blocks are in this: hal.science/hal-02972245 & weakened constraint versions by Rump & Lang www.tuhh.de/ti3/paper/ru...
arxiv.org
On the robustness of double-word addition algorithms
We demonstrate that, even when there are moderate overlaps in the inputs of sloppy or accurate double-word addition algorithms in the QD library, these algorithms still guarantee error bounds of $O(u^...
030
Marc B. Reynolds @marc-b-reynolds.bsky.social · 25/01/2025
A couple of #FloatingPoint papers that I caught my eye for future reading: 1) A tightening of FastTwoSum knowledge 2) Attempting to generate approximations which account for runtime evaluation errors (w source 4 external proc for Sollya) 1) hal.science/hal-04875749v1 2) hal.science/hal-04709615v1
hal.science
FastTwoSum revisited
The FastTwoSum algorithm is a classical way to evaluate the rounding error that occurs when adding two numbers in finite precision arithmetic. Starting with Dekker in the early 1970s, numerous floatin...
000
Marc B. Reynolds @marc-b-reynolds.bsky.social · 17/01/2025
An old blog post by Keith Schwarz that builds (in an easy IMHO to follow way) sampling of a discrete distribution using "alias tables" and building via Vose's method. www.keithschwarz.com/darts-dice-c...
keithschwarz.com
Darts, Dice, and Coins
130
Marc B. Reynolds @marc-b-reynolds.bsky.social · 01/01/2025
A mini "Happy New Year" blog post on a scheme for "drop rates": marc-b-reynolds.github.io/math/2025/01...
marc-b-reynolds.github.io
Item weights vs. the Paradox of Rarity
This post describes using item weights to define the relative frequency of drop rates.
030
Marc B. Reynolds @marc-b-reynolds.bsky.social · 21/12/2024
A little over a month ago the Zed (editor) team put up a blog post on their text representation zed.dev/blog/zed-dec... (A B-tree of 128 byte payloads...interesting) and an optimization related to that which is "find n^th bit set" for precomputed return positions in payload side-line info.
zed.dev
Rope Optimizations, Part 1 - Zed Blog
From the Zed Blog: In this episode of Zed Decoded, Thorsten and Antonio walk through the performance optimizations Antonio when working on Zed's Rope data structure before they then pair on adding mor...
100
Marc B. Reynolds @marc-b-reynolds.bsky.social · 11/12/2024
Tossed up a method for generating the parameterized additive constant of a PCG and babble about the reasoning with some asides. marc-b-reynolds.github.io/math/2024/12...
marc-b-reynolds.github.io
Comments on parameterized SplitMix and PCG style generators
Builds up a rational for a presented method for generating the additive constant of a LCG or Weyl sequence based PRNG.
010
Marc B. Reynolds @marc-b-reynolds.bsky.social · 06/12/2024
Tossed together a gist of tomfoolery: 1) generate a random number with a given population count (portable, bisection method) 2) perform a random bit permutation of the input. (needs PDEP or SAG like op in hardware to be usable) 3) not quite random versions of (2) (continued)
gist.github.com
Skims two methods: bisection method for random numbers with given popcount & branchfree random bit permutation with bit-scatter or sheep-and-goats op.
Skims two methods: bisection method for random numbers with given popcount & branchfree random bit permutation with bit-scatter or sheep-and-goats op. - prng_pop.c
110
Reposted by Marc B. Reynolds
Wenzel Jakob @wjakob.bsky.social · 26/11/2024
Following over 1.5 years of hard work (w/@njroussel.bsky.social &@rtabbara.bsky.social), we just released a brand-new version of Dr.Jit (v1.0), my lab's differentiable rendering compiler along with an updated Mitsuba (v3.6). The list of changes is insanely long—here is what we're most excited about🧵
411238
Marc B. Reynolds @marc-b-reynolds.bsky.social · 20/11/2024
CRC Press is releasing a new book on the IEEE floating point killing format: Posits An old blog post on the format: marc-b-reynolds.github.io/math/2019/02...
010
Reposted by Marc B. Reynolds
Arseny Kapoulkine @zeux.io · 25/10/2024
meshoptimizer 0.22 is out! Featuring significant improvements to simplifier (attribute simplification, fewer topology restrictions, component pruning), new provoking vertex algorithm (thanks to John Hable), clusterization improvements & gltfpack size optimizations.
14915