News

johndcook.com
johndcook.com > blog > 03/12/2026 > arccos

Inverse cosine

1+ day, 3+ hour ago  (294+ words) In the previous two posts, we looked at why Mathematica and SymPy did not simplify sinh(arccosh(x)) to "(x" " 1) as one might expect. After understanding why sinh(arccosh(x)) doesn't simplify nicely, it's natural to ask why sin(arccos(x)) does simplify…...

johndcook.com
johndcook.com > blog > 03/04/2026 > from-logistic-regression-to-ai

From logistic regression to AI

1+ week, 2+ day ago  (407+ words) It is sometimes said that neural networks are "just" logistic regression. (Remember neural networks? LLMs'are neural networks, but nobody talks about neural networks anymore.) In some sense a neural network is logistic regression with more parameters, a'lot more parameters, but…...

johndcook.com
johndcook.com > blog > 03/02/2026 > an-ai-odyssey-part-1-correctness-conundrum

An AI Odyssey, Part 1: Correctness Conundrum

1+ week, 3+ day ago  (541+ words) I recently talked with a contact who repeated what he'd heard regarding agentic AI systems'namely, that they can greatly increase productivity in professional financial management tasks. However, I pointed out that though this is true, these tools do not guarantee…...

johndcook.com
johndcook.com > blog > 02/24/2026 > a-curious-trig-identity

A curious trig identity

2+ week, 2+ day ago  (258+ words) Here is an identity that doesn't look correct but it is. For real'x and'y, I found the identity in [1]. The author's proof is short. First of all, Taking square roots completes the proof. Now note that the statement at the…...

johndcook.com
johndcook.com > blog > 02/25/2026 > trig-of-inverse-trig

Trig of inverse trig

2+ week, 2+ day ago  (291+ words) I ran across an old article [1] that gave a sort of multiplication table for trig functions and inverse trig functions. Here's my version of the table. I made a few changes from the original. First, I used LaTeX, which didn't…...

johndcook.com
johndcook.com > blog > 02/12/2026 > pythagorean-primes

Expressing a prime as the sum of two squares

1+ mon, 18+ hour ago  (445+ words) I saw where Elon Musk posted Grok's answer to the prompt "What are the most beautiful theorems." I looked at the list, and there were no surprises, as you'd expect from a program that works by predicting the most likely…...

johndcook.com
johndcook.com > blog > 02/08/2026 > time-space-tradeoffs

Fibonacci numbers and time-space tradeoffs

1+ mon, 5+ day ago  (320+ words) A few days ago I wrote about Fibonacci numbers and certificates. As I pointed out in the article, there's no need to certify Fibonacci numbers, but the point of the post was to illustrate the idea of a solution certificate…...

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

Gamma function at reciprocals of integers

1+ mon, 1+ week 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

1+ mon, 4+ week 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

2+ mon, 6+ day 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…...