News

johndcook.com
johndcook.com > blog > 02/04/2026 > gamma-reciprocal

Gamma function at reciprocals of integers

Gamma function at reciprocals of integers2+ hour, 48+ min ago   (120+ words) If n is a positive integer, then rounding "(1/n) up to the nearest integer gives'n. In symbols, We an illustrate this with the following Python code. You can find a full proof in [1]. I'll give a partial proof that may be…...

johndcook.com
johndcook.com > blog > 01/14/2026 > montgomerys-trick

Compute multiple modular inverses with Montgomery's trick

Compute multiple modular inverses with Montgomery's trick3+ week, 15+ hour ago   (260+ words) Suppose you have a large prime number'M and you need to find the inverse of several numbers mod'M.' Montgomery's trick is a way to combine the computation of the inverses to take less time than computing the inverses individually. Peter…...

johndcook.com
johndcook.com > blog > 01/07/2026 > chemical-element-symbols

Memorizing chemical element symbols

4+ week, 16+ hour ago   (372+ words) Here's something I've wondered about before: are there good mnemonics for chemical element symbols? Some element symbols are based on Latin or German names and seem arbitrary to English speakers, such as K (kalium) for potassium or Fe (ferrum) for…...

johndcook.com
johndcook.com > blog > 12/23/2025 > bowie-integrator-and-the-nonlinear-pendulum

Bowie's ODE solver and the nonlinear pendulum

Bowie's ODE solver and the nonlinear pendulum1+ mon, 1+ week ago   (428+ words) I recently learned of Bowie's numerical method for solving ordinary differential equations of the form via Alex Scarazzini's masters thesis [1]. The only reference I've been able to find for the method, other than [1], is the NASA Orbital Flight Handbook from…...

johndcook.com
johndcook.com > blog > 12/22/2025 > fit-exponential-data

Trying to fit exponential data

Trying to fit exponential data1+ mon, 1+ week ago   (263+ words) The first difficulty in trying to fit an exponential distribution to data is that the data may not follow an exponential distribution. Nothing grows exponentially forever. Eventually growth slows down. The simplest way growth can slow down is to follow…...

johndcook.com
johndcook.com > blog > 12/20/2025 > fit-logistic-curve

The folly of naively fitting a logistic curve

The folly of naively fitting a logistic curve1+ mon, 2+ week ago   (467+ words) A logistic curve, sometimes called an S curve, looks different in different regions. Like the proverbial blind men feeling different parts of an elephant, people looking at different segments of the curve could come to very different impressions of the…...

johndcook.com
johndcook.com > blog > 12/04/2025 > solving-spherical-triangles

Solving spherical triangles

Solving spherical triangles2+ mon, 11+ hour ago   (376+ words) This post is a side quest in the series on navigating by the stars. It expands on a footnote in the previous post. There are six pieces of information associated with a spherical triangle: three sides and three angles. I…...

johndcook.com
johndcook.com > blog > 12/04/2025 > the-navigational-triangle

The Navigational Triangle

The Navigational Triangle2+ mon, 13+ hour ago   (534+ words) The previous post introduced the idea of finding your location by sighting a star. There is some point on Earth that is directly underneath the star at any point in time, and that location is called the star's GP (geographic…...

johndcook.com
johndcook.com > blog > 11/28/2025 > tricusp-triangle

A hyperbolic triangle with three cusps

A hyperbolic triangle with three cusps2+ mon, 6+ day ago   (236+ words) In spherical geometry, the interior angles of a triangle add up to more than ". And in fact you can determine the area of a spherical triangle by how much the angle sum exceeds ". On a sphere of radius 1, the area…...

johndcook.com
johndcook.com > blog > 11/28/2025 > hyperbolic-circle

A circle in the hyperbolic plane

A circle in the hyperbolic plane2+ mon, 6+ day ago   (352+ words) Let " be the upper half plane, the set of complex real numbers with positive imaginary part. When we measure distances the way we've discussed in the last couple posts, the geometry of " is hyperbolic. What is a circle of radius…...