← Latest papers
🔢 mathematics

The Entropy of Floating-Point Numbers

This paper presents an analytic approximation for the entropy of floating-point numbers, establishes its link to discrete entropy through a novel quantity, proves the approximate invariance of this entropy under scaling, and provides closed-form expressions for common distributions.

Original authors: Sultan Daniels, Samuel H. D'Ambrosia, Michael R. DeWeese, Anant Sahai

Published 2026-05-13
📖 5 min read🧠 Deep dive

Original authors: Sultan Daniels, Samuel H. D'Ambrosia, Michael R. DeWeese, Anant Sahai

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Picture: Measuring the "Surprise" of Computer Numbers

Imagine you are trying to describe a continuous landscape, like a smooth hill, using a set of discrete stepping stones. In the world of computers, these stepping stones are floating-point numbers. They are the way computers store real-world values (like 3.14159 or 0.00001) using a limited number of bits (0s and 1s).

The authors of this paper asked a fundamental question: If we take a random variable (like the height of a wave or the temperature of a room) and force it onto these stepping stones, how much "information" or "surprise" is left in the result?

In information theory, this "surprise" is called Entropy. The higher the entropy, the more unpredictable the number is. The lower the entropy, the more predictable it is.

The Problem: Rulers with Moving Marks

To understand the paper's contribution, you have to understand how floating-point numbers work.

  • Uniform Quantization (The Ruler): Imagine a standard ruler where the marks are always exactly 1 centimeter apart. If you measure a long distance, the marks are the same size everywhere. This is easy to analyze.
  • Floating-Point Quantization (The Zoomable Ruler): Floating-point numbers are different. They are like a ruler that zooms in and out.
    • Near zero, the marks are tiny and very close together (high precision).
    • Far away from zero, the marks get huge and spread far apart (low precision).

Because the "ruler marks" change size depending on where you are, calculating the entropy (the surprise) is very hard. You can't just use the standard formulas that work for the fixed ruler.

The Solution: A New "Magic Formula"

The authors developed a predictive analytic approximation. Think of this as a "magic formula" that lets you estimate the entropy of a floating-point number without having to do millions of complex calculations.

They found that the entropy of a floating-point number is roughly equal to:

The "Smoothness" of the original data MINUS a correction factor based on how the floating-point ruler stretches.

They call this new quantity the "Differential Floating-Point Entropy."

The Key Discovery: Scaling Doesn't Matter

One of the most interesting findings in the paper is about scaling.

  • If you take a random variable (like the temperature) and multiply it by 2 (making it twice as hot), the differential entropy (the standard measure for smooth data) changes. It gets bigger.
  • However, the authors proved that for floating-point numbers, the entropy stays roughly the same when you scale the data up or down, as long as you don't hit the "overflow" (too big) or "underflow" (too small) limits of the computer.

The Analogy: Imagine you have a map of a city.

  • If you zoom out (scale up), the standard map says the city looks bigger and more complex.
  • But a floating-point map is like a "smart map" that automatically adjusts its grid lines as you zoom. Because the grid lines stretch and shrink to match the zoom level, the amount of "detail" (entropy) you see on the map stays constant.

What They Actually Calculated

The paper provides a "menu" of formulas (Table I in the paper) for common types of data distributions. They calculated the approximate entropy for:

  • Gaussian (Bell Curve): The standard "normal" distribution.
  • Uniform: Data that is equally likely to be anywhere in a range.
  • Gamma, Chi-squared, Laplace, Logistic, Weibull, Log-normal, Pareto, Beta, and Student's t: Various other shapes of data distributions.

For each of these, they gave a simple equation involving the precision (pp) of the floating-point number (how many bits are used for the decimal part).

The Result: For almost all these distributions, the entropy is approximately:
Precision+A Constant \text{Precision} + \text{A Constant}
This means that if you know how many bits your computer uses for the decimal part, you can predict the entropy of the data with surprising accuracy, regardless of the specific shape of the data distribution (as long as it fits within the computer's range).

How Good is the Approximation?

The authors didn't just guess; they proved how close their "magic formula" is to the real answer.

  1. Smoothing: They replaced the jagged, step-like nature of floating-point numbers with a smooth curve to make the math easier. They proved the error from this smoothing is very small (less than 0.5 bits per dimension).
  2. Bounds: They calculated the "worst-case scenario" for the error. They showed that the difference between their formula and the exact answer is tiny, provided the data doesn't try to represent numbers that are too huge or too tiny for the computer to handle.

Summary of the "Takeaways"

  1. Floating-point is a non-uniform ruler: It has tiny steps near zero and giant steps far away.
  2. New Link: The paper connects the "smooth" entropy of real-world data to the "discrete" entropy of floating-point numbers using a new formula.
  3. Scale Invariance: Unlike standard math, the entropy of floating-point numbers doesn't change if you simply multiply the data by a constant (scale it). The computer's "ruler" adjusts automatically.
  4. Simple Formulas: You can now calculate the entropy of many common data types (like Bell curves or Uniform distributions) just by knowing the precision of the floating-point format.

In short, the paper gives us a simple, accurate way to measure how much "information" is stored in a floating-point number, revealing that the computer's way of zooming in and out creates a unique, stable type of entropy that doesn't care about the size of the numbers, only their relative precision.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →