Topics /

Math & Algorithms

The most popular blog posts about math & algorithms on Hacker News. 212 posts.

2025
62

500 days of math

I recently crossed 500 days of practicing math daily with Math Academy. I wrote about my experience after 100 days here. TL;DR: I am still very impressed by the Math Academy system and highly…

63

Solving Fizz Buzz with Cosines

Fizz Buzz is a counting game that has become oddly popular in the world of computer programming as a simple test of basic programming skills. The rules of the game are straightforward. Players say the numbers aloud in order beginning with one. Whenever a number is divisible by 3, they say 'Fizz' instead. If it is…

66

Think in math, write in code (2019)

Programmers love to discuss programming languages. We not only debate their technical merits and aesthetic qualities, but they become integrated into our personal identities, along with the values and traits that we associate with them. Some even defend a form of Linguistic Determinism that thinking is confined to…

69

Generating Voronoi diagrams using Fortune's algorithm

This article is about using Fortune’s Algorithm to generate Voronoi Diagrams in O(nlogn) time. If I’d known how hard it would be I wouldn’t have started it. If you are intending to implement it with the intent to actually use it, rather than as an exercise, I would recommend not using Fortune’s. Unless you are doing a…

70

How Slide Rules Work

The survival of our species owes much to our brain, specifically, its ability to observe, analyse, and plan. Planting crops and storing grains for the winter were some of the earliest uses of these abilities. Measuring and calculating are foundational elements of observation, analysis, and planning. Computation, upon…

72

Very Wrong Math

The difference between misinformation and disinformation is the difference between ignorance and malice. Trolling is somewhat different, incorporating an element of provocation and narcissism. But what the hell is this?

75

Relaxed Radix Balanced Trees (2024)

I’m adding immutable vectors to my language, Ivan, and needed to pick a suitable data structure to implement them. Clojure uses Persistent Vectors (PVs) which support lookups, updates, and appends all in ‘effectively’ constant time. However, it doesn’t have efficient insert or merge operations. Relaxed Radix Balanced…

76

Memory access is O(N^[1/3])

In computer science, we often compare the efficiency of algorithms by describing their runtime as a function of the size of the input. Sorting is O(n * log(n)), meaning that sorting a list of N items takes an amount of time proportional to the number of items multiplied by its logarithm. Matrix multiplication is…

83

Spline Distance Fields

Earlier this year I decided to put my main project Tangerine on hold indefinitely and began prototyping a new renderer in an unfamiliar language using a totally new graphics API with the goal of overcoming all of Tangerine's technical shortcomings. The new renderer is an eccentric CPU ray tracer called Star Machine…

87

The most famous transcendental numbers

The mathematical constant pi represents the ratio of the circumference of a circle to its diameter. It is the most famous ratio in mathematics both on Earth and probably for any advanced civilization in the universe. The number pi, like other fundamental constants of mathematics such as e = 2.718..., is a…