Why Does Integer Addition Approximate Float Multiplication?
Here is a rough approximation of float multiplication (source): float rough_float_multiply(float a, float b) { constexpr uint32_t bias = 0x3f76d000; return bit_cast<float>(bit_cast<uint32_…
The latest blog posts to take off on Hacker News. 2,391 posts.
Here is a rough approximation of float multiplication (source): float rough_float_multiply(float a, float b) { constexpr uint32_t bias = 0x3f76d000; return bit_cast<float>(bit_cast<uint32_…
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…
Hamilton’s quaternion number system $latex {\mathbb{H}}&fg=000000$ is a non-commutative extension of the complex numbers, consisting of numbers of the form $latex {t + xi + yj + zk}&f…
Gradient descent is the preferred way to optimize neural networks and many other machine learning algorithms but is often used as a black box. This post explores how many of the most popular gradient-based optimization algorithms such as Momentum, Adagrad, and Adam actually work.
Chris Grossack's math blog and professional website.
Cosine similarity - the duct tape of AI. Convenient but often misused. Let's find out how to use it better.
Generating an infinite world with the Wave Function Collapse algorithm - Personal blog about game development, programming and making
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?
Stephen Wolfram discusses understanding proofs discovered using automated theorem proving. Based on Wolfram’s proof of the simplest axioms of logic of Boolean algebra.
Large language models like ChatGPT & Claude have become ubiquitous in today’s world. I visited a friend for the New years eve and was impressed by how ChatGPT was being extensively used within the family. The friend’s little kid is going to grow up in a world, where turning to large language models (LLM) for quick…
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…
A blog about computers, functional languages, Lisp, and Scheme.
Intel released the powerful Pentium processor in 1993, establishing a long-running brand of high-performance processors. 1 The Pentium incl...
Perturbation and rescaling for efficient rendering of fractal images.
Mazes are typically constructed on regular grids: square, triangular, hexagonal, etc. But what if you generate a maze on top of a Penrose tiling, which is guaranteed to be irregular? (It is an aperiodic tiling .) The resulting mazes have a very characteristic appearance: they are filled with circles and stars, but the…
So the big news this week is that o3, OpenAI’s new language model, got 25% on FrontierMath. Let’s start by explaining what this means.
Division is quite an expensive operation. For instance, latency of the 32-bit division varies between 10 and 15 cycles on the Cannon Lake CPU, and for Zen4 this range is from 9 to 14 cycles. The latency of 32-bit multiplication is 3 or 4 cycles on both CPU models.
if $n \equiv 0 \, (\text{mod}\, 2)$ the ant turns 90º clockwise, else the ant turns 90º counter-clockwise. On both accounts, the state of the cell is flipped and the ant moves forward one unit. This is repeated until $n = 1$.
An interactive introduction to Turing machines, the theoretical foundation of modern computing.
3D visualization tool of spherical harmonics. Visualize and compare real, imaginary, and complex components by adjusting the degree l and order m parameters.
An article about music and geometry, in particular about musical intervals and scales and their geometric equivalent ...
2 model 2 dreidel
When I started learning about loss functions, I could always understand the intuition behind them. For example, the mean squared error (MSE) for regression seemed logical—penalizing large deviations from the ground-truth makes sense. But one thing always bothered me: I could never come up with those loss functions on…
A visual proof that a2 – b2 = (a + b)(a – b). Sophie Germain wrote, “It has been said that algebra is but written geometry and geometry is but diagrammatic algebra.”
February 24, 2020. The computational power of a humble napkin is awesome. I discuss three napkin algorithms — dimensional analysis, Fermi estimates, and random walks — and use them to figure out why rain falls, the length of the E. coli genome, and the mass of a proton, among other things. These examples suggest a…
So I’m two months into trying to teach a proof of Fermat’s Last Theorem to a computer. We already have one interesting story, which I felt was worth sharing.
I’ve been on a weird kick lately making images using Excel. [Here’s one post. I hope to post more soon.] If you add a background color to each cell in a spreadsheet and resize the cell …
Alok Singh's Blog