
Handbook of Floating-Point Arithmetic
by Jean-Michel Muller, Nicolas Brunie, Florent de Dinechin, Claude-Pierre Jeannerod, Mioara Joldes, Vincent Lefèvre, Guillaume Melquiond, Nathalie Revol, Serge Torres · first published 2009
11mentions
7recommended by
10HN commenters
2015–2026first – last mentioned
70% recommend30% neutral
Why HN recommends it
Thorough reference covering both hardware and software floating-point methods, including how elementary functions like pow, exp and log are computed, with deep dives into numerical algorithms.
Summarised by Claude from recommending comments
Affiliate links. As an Amazon Associate I earn from qualifying purchases.

…an integer, so we need other solutions. How exactly the pow function (or other math function like exp, log, cos, ...) are computed is a vast research subject in itself, but if you are interested, the Handbook of Floating-Point Arithmetic (https://perso.ens-lyon.fr/jean-michel.muller/Handbook.html) is both a good introduction to the domain (and the problems associated with the finite precision of floating point number), and provides a…
on “A Linear Algebra Trick for Computing Fibonacci Numbers Fast” ↗EDIT: I see that libbf implements faithful rounding of operations. Nice. TIL. See also: Jean-Michel Muller's books: "Handbook of Floating Point Arithmetic," and "Elementary Functions." https://www.sollya.org/
on “Beeg float library, a Rust port of Fabrice Bellard's libbf” ↗If you have a copy of Knuth's Art of Computer Programming, the section on seminumerical algorithms covers software floating point. Another source is the Handbook of Floating Point Arithmetic, which covers both hardware and software methods in detail. An implementation in source code may be found in libgcc. IIRC their ARM assembly code versions are some of the fastest routines available…
on “The Dark Silicon Problem and What It Means for CPU Designers (2013)” ↗…components, theories, etc that you get lost very soon At end all you can really do 1. Grab a statistics book and get into ML theoretically 2. Learn about numerical computations, I particularly enjoyed the Handbook of Floating Point Arithmetic, but I never really finished it 3. Libraries have lot of optimizations in it pertaining to the specific architecture, and in fact, I remember that someone gave a demonstration of using numpy and he faced…
on “Ask HN: Tutorials written with heavy dependencies” ↗…pythonsollya (a Python wrapper for Sollya), and SageMath. Other than that, some of the overview references about Remez algorithm (should be a bit closer to your taste) that I like are: - J.M. Muller et. al., "Handbook of Floating-Point Arithmetic", section 10.3.2 (and follow references in that section). - N. Brisebarre and S. Chevillard, "Efficient polynomial L-approximations," 18th IEEE Symposium on Computer Arithmetic (ARITH '07), which is…
on “Cosine Implementation in C” ↗A good reference is the Handbook of Floating-Point Arithmetic. If you can be more specific about what is it that's not clear, I'll give more specific "proof". Even though you're being a bit "sealion"-y. > It's ridiculous to post a dismissal without even watching…
on “Finding the best sine function for Nintendo 64” ↗I recommend the "Handbook of Floating-point Arithmetic" if this piques interest. I think it's freely available on HAL.
on “Taming floating-point sums” ↗…of the art for those algorithms has moved quite a bit since. Nowadays, you can ensure that your sum/BLAS operation produces a result within one ulp of the exact result! I highly recommend perusing the Handbook of Floating-Point Arithmetic (the Accurate Algorithm online page also seems fine [0]) to get an idea of what can be done. Implementations of these ideas can be found in most languages used for numerical computation (a quick Google…
on “NumPy QuadDType: Quadruple Precision for Everyone” ↗…that affects the output is tiny; on the x87 it was approximately 1 in 4096 [2], and for float64 to float32 it's closer to one in a billion. ([1] When double rounding is odd - Normale, et al. - 2004, [2] Handbook of Floating-Point Arithmetic - Muller, et al. - 2010)
on “Can you safely parse a double when you need a float?” ↗…function and this has nothing to do with the behavior of approximation polynomial at the edges; you may very well have non-zero errors at t and 2t and there is nothing wrong or alarming about it (see Handbook of Floating Point Arithmetic, Chapter 11, for example). The point is, the max rel error should be kept small, which Mathematica does, 10 times better. Such an artificial condition is necessary only when the relative error function…
on “Fast Approximate Logarithms, Part I: The Basics” ↗The _algorithm_ is certainly correct (this is a relatively straightforward and well-known theorem of floating-point arithmetic, see e.g. "Handbook of Floating-Point Arithmetic" by JM Muller et al). Whether or not the code presented is a faithful translation of that algorithm is more subtle and somewhat dependent on the environment; the AddWithError operation requires that…
on “Emulating the FMAdd Instruction, Part 1: 32-bit Floats” ↗