News

johndcook. com
johndcook. com > blog > 05/23/2026 > hilbert-transform-as-an-infinite-matrix

Hilbert transform as an infinite matrix

2+ day, 1+ hour ago  (248+ words) The previous post linked to a post I wrote a few years ago about the Hilbert transform and Fourier series. That post says that if the Fourier series of a function is then the Fourier series of its Hilbert transform…...

Symbols: nasdaq:hilb
johndcook. com
johndcook. com > blog > 05/23/2026 > real-and-imaginary-parts

Real and imaginary parts

2+ day, 2+ hour ago  (231+ words) The previous post announced some notes I wrote up based on an article by Henry Baker implementing functions of a complex variable in terms of functions of a real variable. That is, it finds functions u(x, y) and v(x,…...

Symbols: nasdaq:real
johndcook. com
johndcook. com > blog > 05/22/2026 > complex-functions-real-parts

Building complex functions out of real parts

2+ day, 13+ hour ago  (233+ words) A couple months ago I wrote about how to compute the sine and cosine of a complex number using only real functions of real variables using the equations You can do something analogous for all the elementary functions, though some…...

Symbols: prime-sr
johndcook. com
johndcook. com > blog > 05/21/2026 > couth-and-uncouth-function-pairs

Couth and uncouth function pairs

3+ day, 22+ hour ago  (406+ words) You can't always get what you want. But sometimes you get what you need." " The Rolling Stones Circular functions and hyperbolic functions aren't invertible, but we invert them anyway. These functions map many points in the domain to each point…...

Symbols: btc-usd
johndcook. com
johndcook. com > blog > 05/21/2026 > circular-hyperbolic-rotations

Circular and hyperbolic functions differ by rotations

4+ day, 36+ min ago  (196+ words) The difference between a circular function and a hyperbolic function is a rotation or two. For example, cosh(z) = cos(iz). You can read that as saying that to find the hyperbolic cosine of z, first you rotate'z a quarter turn…...

Symbols: btc-usd,eth-usd
johndcook. com
johndcook. com > blog > 05/19/2026 > zagiers-equation

Don Zagier's approximation of Markov's diophantine equation

5+ day, 23+ hour ago  (342+ words) Markov numbers are integer solutions to The Wikipedia article on Markov numbers mentions that Don Zagier studied Markov numbers by looking the approximating equation x" +y" +z" = 3xyz+ 4/9 which is equivalent to wheref(t) is defined as arccosh(3t/2). It wasn't clear to…...

johndcook. com
johndcook. com > blog > 05/15/2026 > xorshift128-state

Recovering the state of xorshift128

1+ week, 3+ day ago  (254+ words) I've written a couple posts lately about reverse engineering the internal state of a random number generator, first Mersenne Twister then lehmer64. This post will look at xorshift128, implemented below. Recovering the internal state of the generator is simple: it's the four…...

johndcook. com
johndcook. com > blog > 05/12/2026 > c-128-bit-int

C 128-bit unsigned int literals and printing

1+ week, 6+ day ago  (207+ words) If you look very closely at my previous post, you'll notice that I initialize a 128-bit integer with a 64-bit value. The 128-bit unsigned integer represents the internal state of a random number generator. Why not initialize it to a…...

Symbols: base-16,four.l
johndcook. com
johndcook. com > blog > 05/12/2026 > hacking-the-lehmer64-rng

Hacking the lehmer64 RNG

1+ week, 6+ day ago  (330+ words) A couple days ago I wrote about hacking the Mersenne Twister. I explained how to recover the random number generator's internal state from a stream of 640 outputs. This post will do something similar with the lehmer64 random number generator. This generator…...

Symbols: query.ts,four.l
johndcook. com
johndcook. com > blog > 05/11/2026 > euler-function

Euler function in the context of q-series and partitions

1+ week, 6+ day ago  (282+ words) This morning I wrote a post about the probability that a random matrix over a finite field is invertible. If the field has q elements and the matrix has dimensions n " n then the probability is In that post I…...

Symbols: nyse:q