Please confirm you are human

This browser or connection looks automated. Press and continuously hold the control for 3 seconds to enable Google-hosted web results and, when separately allowed, AI-assisted answers.

A successful check enables 100 search requests. Interactive access does not authorize scraping, systematic collection, or reuse of search output.

Hold with a pointer, or hold Space or Enter.

News

johndcook.com
johndcook.com > blog > 08/16/2026 > proportion-of-1s-in-a-hadamard-matrix

Proportion of 1s in a Hadamard matrix

3+ hour, 46+ min ago   (181+ words) The first post in the recent series of posts on Hadamard matrices describes a way of constructing new Hadamard matrices from two other Hadamard matrices by taking their Kronecker product. Starting with a Hadamard matrix H0 and a Hadamard matrix G,…...

johndcook.com
johndcook.com > blog > 08/15/2026 > compressing-a-hadamard-matrix

Compressing a Hadamard matrix

1+ day, 13+ hour ago   (469+ words) Hadamard matrices are in the news following the recent announcement of a newly discovered Hadamard matrix. I’ve written three posts on Hadamard matrices recently, one as a sort of introduction and two on applications: the error correcting code used in…...

johndcook.com
johndcook.com > blog > 08/13/2026 > mariner-hadamard

How NASA’s Mariner 9 probe encoded images

3+ day, 5+ hour ago   (276+ words) The images were encoded for transmission using a code based on Hadamard matrices, specifically a (32, 6, 16) Hadamard code. This means that each 6-bit pixel value was encoded as a 32-bit code word, with all code words differing in at least 16 positions....

johndcook.com
johndcook.com > blog > 08/10/2026 > inverse-differential-equations

Inverse differential equations

6+ day, 14+ hour ago   (237+ words) In science and engineering classes, you might describe a system using Newton’s laws and end up with a differential equation. You then solve the differential equation, analytically or numerically, to see how the solutions behave. You might also do the…...

johndcook.com
johndcook.com > blog > 08/09/2026 > dna-and-bessel-functions

DNA and Bessel functions

1+ week, 11+ hour ago   (153+ words) I was reading a book on the history of the discovery of the structure of DNA [1] and was surprised by a few passing references to Bessel functions. When X-rays are diffracted by a helical structure, the resulting diffraction pattern breaks…...

johndcook.com
johndcook.com > blog > 08/07/2026 > how-not-to-calculate-cos

How not to calculate cosine

1+ week, 2+ day ago   (474+ words) Calculus professors with no experience in numerical computing will tell students that computers calculate trig functions with power series. They don’t. I worked on the implementation of trig functions in hardware, and I can assure you we didn’t just use…...

johndcook.com
johndcook.com > blog > 08/07/2026 > cos200

Calculating the cosine of numbers outside the range of floats

1+ week, 2+ day ago   (398+ words) In a footnote to the previous post, I said that Python’s math library can calculate the logarithm of extremely large numbers but not the cosine. This post will expand on that comment. In this post I’ll use n = 200! as my…...

johndcook.com
johndcook.com > blog > 08/06/2026 > log1000

Calculating log(1000!)

1+ week, 3+ day ago   (531+ words) The previous post pointed out that the following code such as the following unexpectedly works. If you don’t find this unexpected, note that if you replace math.log with numpy.log the code will fail [1]. Functions like natural logarithm operate…...

johndcook.com
johndcook.com > blog > 07/27/2026 > float-binary

Printing floating point numbers in binary

2+ week, 6+ day ago   (215+ words) It’s well known that you can convert the base 16 (hex) representation of an integer to the base 2 (binary) representation by simply converting each digit from hex to binary. For example, CAFEhex = 1100 1010 1111 1110two I imagine it’s less well known that you can…...

johndcook.com
johndcook.com > blog > 07/23/2026 > an-almost-periodic-function

An almost periodic function

3+ week, 3+ day ago   (175+ words) This post takes a more abstract view of the previous post. That post looked at the concrete question of whether a number ever has the same sine in radians as in degrees. The relation between radians and degrees is irrelevant…...