C++

Browse posts by tag

Elements of Programming

Notes

Rigorous foundations of generic programming. Connects algebra and algorithms. Stepanov’s magnum opus.

Differentiation: Three Ways

Three approaches to computing derivatives—forward-mode AD, reverse-mode AD, and finite differences—each with different trade-offs. Understanding when to use each is essential for numerical computing and machine learning.

Computer Science Mathematics

How Iterators Give You N+M Instead of N×M

The problem is combinatorial. You have N algorithms (sort, search, find, copy) and M containers (array, list, tree, hash table). The naive approach: implement each algorithm for each container. That’s N×M implementations.

The insight is to …

Is It Prime?

The Miller-Rabin primality test demonstrates how probabilistic algorithms can achieve arbitrary certainty, trading absolute truth for practical efficiency.

Computer Science Mathematics