Item weights vs. the Paradox of Rarity

This post describes using item weights to define the relative frequency of drop rates.

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.

Popcount walks: next, previous, toward and nearest

Informal (and by-example) derivation of walking adjacent integers with the same population count as the input.

A fast path floating point underflow test elision from absorption

A sketch of a fast path filter to avoid explicit underflow checking following an addition or subtraction.

Stable look-at rotations

Derives stable look-at computations for Yaw/Pitch, swing-twist and quaternions

Weighted function approximation: angle trisection

Example of a weighted sum of functions approximation: trisect an angle

An evil and odious map (partition into even/odd parity in increasing order)

Presents a map that paritions integers into the even and odd parity subsets where each are in increasing order

A fast perfect shuffle for n≤64

Describes a perfect shuffle using a bitset and the original pencil-and-paper Fisher-Yates method.

Quaternion swing twist decomposition

Given a unit quaternion $Q$ factor into a pair such that $Q = Q_rQ_a$ where $a$ is a predefined axis and $r$ is an orthogonal axis. This is commonly called swing-twist decomposition.

Random number draws with fixed parity

Describes simple transforms to generate random numbers with a given parity and the math background.

A cheap normal distribution approximation

A brief explaination and implementation of the standard normal distribution approximation "on the cheap".

Error growth of composing rotations

Some quick-n-dirty empirical results to spitball the error growth on composing rotations

Basic uniform random floating-point values

Micropost on unbiased uniform float generation on $\left(0,1\right]$, $\left[-1,1\right)$ and $\left[-1,1\right)$. The latter two have twice the number of samples as the standard method.

Solve power-of-two LCG for constants

A quick derivation of solving for LCG constants (power-of-two modulus) given three sequential outputs of the generator.

A design and implementation of sincospi in binary32

Walks through constructing faithfully rounded $\sin\left(\pi x\right)$ and $\cos\left(\pi x\right)$.

Generating the log of a uniform random float

Sketches out some possible implementations of taking the logarithm of a uniform floating point value.

Computing floating point additive recurrence

Computing Weyl (additive recurrence) sequences in float-point has some gotchas.

FMA: solve quadratic equation

Micro-post on title.

FMA: extended precision addition and multiplication by constant

Brushstrokes using FMAs to compute: K+x and Kx with K in higher than native precision.

Tau and the art of Windmill jousting

TLDR: Use tau if you want, but you need a good argument to say pi was a historic mistake.