Floating points between zero and one
floating-points-between-zero-and-one - Chad Nauseam Home
Every blog post that took off on Hacker News, ranked by the votes of its best submission. 2,391 posts.
floating-points-between-zero-and-one - Chad Nauseam Home
I didn’t want to buy a trampoline. It wasn’t the money.
Suppose you have an array of floating-point numbers, and wish to sum them. You might naively think you can simply add them, e.g. in Rust:
Cryptographic schemes are based on the computational difficulty of solving some ‘hard’ problem. For example, RSA (specifically, RSA-2048) is based on the difficulty of a problem like this:
Premature optimisation might be the root of all evil, but overdue optimisation is the root of all frustration. No matter how fast hardware becomes, we find it easy to write programs which run too slow. Often this is not immediately apparent. Users can go for years without considering a program’s performance to be an…
And implications for RLVR progress
We can define roundness in many ways. For example, as you may know, the circle is the shape that given a fixed perimeter maximizes the area. This definition has many problems. One of the problems is that countries generally have chaotic perimeters (also known as borders), so they tend to be much longer than they seem…
THE 17x17 PROBLEM HAS BEEN SOLVED!!!!! On Nov 30, 2009 I posted here the following challenge: If someone emails me a 4-coloring of...
Deep Learning is amazing. But why is Deep Learning so successful? Is Deep Learning just old-school Neural Networks on modern hardware? Is it just that we have so much data now the methods work b…
Blog of Raph Levien.
I'm assuming you're familiar with the basic idea of what a Turing machine is . There are a few parts to building one in Magic: a tape extending in two directions storing cells of a few different "colours"; a processing head that can read the current cell's colour, write a new colour and change its state if necessary…
Its been quite some time since I wrote a Data Mining post . Today, I intend to post on Mean Shift – a really cool but not very well known algorithm. The basic idea is quite simple but the results a…
John D. Cook, Greg Egan, Dan Piponi and I had a fun mathematical adventure on Twitter. It started when John Cook wrote a program to compute the probability distribution of distances $latex |xy R…
The C standard library includes a qsort() function for sorting arbitrary buffers given a comparator function. The name comes from its original Unix implementation, “quicker sort,” a variation of the well-known quicksort algorithm. The C standard doesn’t specify an algorithm, except to say that it may be unstable (C99…
We describe a graph-theoretic analogue of vector calculus. The linear operators of vector calculus (gradient, divergence, laplacian) correspond to the matrices naturally associated to graphs (incidence matrix, adjacency matrix). This analogy is useful for formalizing the discretization of some problems in image and…
A sparse matrix is a matrix that has a value of 0 for most elements. If the ratio of N umber of N on- Z ero ( NNZ ) elements to the size is less than 0.5, the matrix is sparse. While this is the mathematical definition, I will be using the term sparse for matrices with only NNZ elements and dense for matrices with all…
Follow me on Bluesky! A Log-Structured Merge tree, or LSM, is a popular data structure for storage engines. It’s what is used by RocksDB, which is sort of...
Lagrange multipliers are used in multivariable calculus to find maxima and minima of a function subject to constraints (like "find the highest elevation along the given path" or "minimize the cost of materials for a box enclosing a given volume"). It's a useful technique, but all too often it is poorly taught and…
As you all may know, I watched and posted my lecture notes of the whole MIT Introduction to Algorithms course. In this post I want to summarize all the topics that were covered in the lectures and point out some of the most interesting things in them. Actually, before I wrote this article, I had started writing an...
We usually learn that 1 kilobyte is 1024 bytes, 1 MB is 1024 kilobytes, etc. But is this true or a kilobyte is precisely 1000 bytes?
The European Commission just released their Proposal for a Regulation on a European approach for Artificial Intelligence . They finally get around to a definition of “AI” on page 60 of the report (link above):
In this article we’ll look at how to implement the Elo rating system in code.
Last time we talked about free will, superintelligent predictors, and Dr. Evil planning to destroy the earth from his moon base. Today I'd like to talk about a more down-to-earth topic: time travel. The first point I have to make is one that Carl Sagan made: we're all time travelers—at the rate of one second per…
Parts 1 and 2 are found here and here
In the two months since I last blogged, the US has continued its descent into madness. Yet even while so many certainties have proven ephemeral as the morning dew—the US’…