Pi’s Evil Twin Goes For Infinity

Most people know about the numerical constant pi (or π, if you prefer). But did you know that pi has an evil twin represented by the symbol ϖ? As [John Carlos Baez] explains, it and its related functions are related to the lemniscate as pi relates to circles. What’s a lemniscate? That’s the proper name for the infinity sign (∞).

[John] shows how many of the same formulas for pi also work for the lemniscate constant (the name for ϖ). Some  (as John calls them) “mutant” trig functions use the pi-like constant.

Continue reading “Pi’s Evil Twin Goes For Infinity”

Why NASA Only Needs Pi To So Many Decimal Places

If you’re new to the world of circular math, you might be content with referring to pi as 3.14. If you’re getting a little more busy with geometry, science, or engineering, you might have tacked on a few extra decimal places in your usual calculations. But what about the big dogs? How many decimal places do NASA use?

NASA doesn’t need this many digits. It’s likely you don’t either. Image credits: NASA/JPL-Caltech

Thankfully, the US space agency has been kind enough to answer that question. For the highest precision calculations, which are used for interplanetary navigation, NASA uses 3.141592653589793 — that’s fifteen decimal places.

The reason why is quite simple, going into any greater precision is unnecessary. The article demonstrates this by calculating the circumference of a circle with a radius equal to the distance between Earth and our most distant spacecraft, Voyager 1. Using the formula C=2pir with fifteen decimal places of pi, you’d only be off on the true circumference of the circle by a centimeter or so. On solar scales, there’s no need to go further.

Ultimately, though, you can calculate pi to a much greater precision. We’ve seen it done to 10 trillion digits, an effort which flirts with the latest Marvel movies for the title of pure irrelevance. If you’ve done it better or faster, don’t hesitate to let us know!

Hack On Self: Headphone Friend

In the last two articles, I talked about two systems relying on audio notifications. The first one is the Alt-Tab annihilator system – a system making use of my window monitoring code to angrily beep at me when I’m getting distracted. The other is the crash prevention system – a small script that helps me avoid an annoying failure mode where I run out of energy before getting myself comfortable for it.

I’ve been appreciating these two systems quite a bit – not only are they at my fingertips, they’re also pretty effective. To this day, I currently use these two systems to help me stay focused as I hack on my own projects or write articles, and they are definitely a mainstay in my self-hacking arsenal.

There is a particular thing I’ve noticed – audio notifications help a fair bit in a way that phone or desktop notifications never would, and, now I have a framework to produce them – in a way that calls for a purpose-tailored device. It’s just wireless headphones, Pi-powered, connected through WiFi, and a library to produce sounds on my computer, but it turns out I can squeeze out a lot out of this simple combination.

Here’s a pocketable device I’ve developed, using off-the-shelf hardware – an audio receiver/transmitter with extra IO, paired to my laptop. And, here’s how I make use of this device’s capabilities to the fullest.

Audio Output

In the “producing sound out of a Pi” article, I’ve mentioned USB-C 3.5mm soundcards. You can use them with a USB-C host port, and you don’t even need any sort of resistors for that – the soundcard doesn’t try and detect state of the CC pin, and why would it, anyway? Get VBUS, GND, D+, and D-, and you got yourself an audio card with high quality output.

Continue reading “Hack On Self: Headphone Friend”

PI Board chess board on a table in a room

Chess What: One More Pi-Powered Board

Chess is timeless, but automating it? That’s where the real magic begins. Enter [Tamerlan Goglichidze]’s Pi Board, an automated chess system that blends modern tech with age-old strategy. Inspired by Harry Potter’s moving chessboard and the commercial Square Off board, [Tamerlan] re-imagines the concept using a Raspberry Pi, stepper motors, and some clever engineering. It’s not just about moving pieces — it’s about doing so with precision and flair.

At its core, the Pi Board employs an XY stepper motor grid coupled with magnets to glide chess pieces across the board. While electromagnets seemed like a promising start, [Tamerlan] found them impractical due to overheating and polarity-switching issues. Enter servo linear actuators: efficient, precise, and perfect for the job.

But the innovation doesn’t stop there. A custom algorithm maps the 8×8 chess grid, allowing motors to track positions dynamically—no tedious resets required. Knight movements and castling? Handled with creative coding that keeps gameplay seamless. [Tamerlan] explains it all in his sleekly designed build log.

Though it hasn’t been long since we featured a Pi-powered LED chess board, we feel that [Tamerlan]’s build stands out for its ingenuity and optimization. For those still curious, we have a treasure trove of over fifty chess-themed articles from the last decade. So snuggle up during these cold winter months and read up on these evergreens!

Continue reading “Chess What: One More Pi-Powered Board”

50-Year-Old Program Gets Speed Boost

At first glance, getting a computer program to run faster than the first electronic computers might seem trivial. After all, most of us carry enormously powerful processors in our pockets every day as if that’s normal. But [Mark] isn’t trying to beat computers like the ENIAC with a mobile ARM processor or other modern device. He’s now programming with the successor to the original Intel integrated circuit processor, the 4040, but beating the ENIAC is still little more complicated than you might think with a processor from 1974.

For this project, the goal was to best the 70-hour time set by ENIAC for computing the first 2035 digits of pi. There are a number of algorithms for performing this calculation, but using a 4-bit processor and an extremely limited memory of only 1280 bytes makes a number of these methods impossible, especially with the self-imposed time limit. The limited instruction set is a potential bottleneck as well with these early processors. [Mark] decided to use [Fabrice Bellard]’s algorithm given these limitations. He goes into great detail about the mathematics behind this method before coding it in JavaScript. Generating assembly language from a working JavaScript was found to be fairly straightforward.

[Mark] is also doing a lot of work on the 4040 to get this program running as well, including upgrades to the 40xx tool stack, the compiler and linker, and an emulator he’s using to test his program before sending it to physical hardware. The project is remarkably well-documented, including all of the optimizations needed to get these antique processors running fast enough to beat the ENIAC. We won’t spoil the results for you, but as a hint to how it worked out, he started this project using the 4040 since his original attempt using a 4004 wasn’t quite fast enough.

Solar Power Your Pi

Running a Raspberry Pi with solar power sounds easy. Of course, like most things, the details are what get you. About a year ago, [Bystroushaa] tried it without success. But the second time turned out to be the charm.

Of course, success is a relative term. It does work, but there is concern that it won’t be sufficient in the winter. In addition, if the battery dies, everything doesn’t restart automatically. Still, it is usable, and there should be ways to solve those problems.

The original attempt used a PiJuice hat and solar panel. This time, the design didn’t use these, opting instead for a LiFePO4 battery, a solar regulator, and a solar panel. The rest of it comes down to mechanical and physical mounting. The cheap regulator has some drawbacks. For example, it doesn’t allow for monitoring like more expensive units. It also cannot balance the cells periodically, although that could be done with an external controller.

We’ve seen solar-powered Pi boards before. Or, try a Game Boy.

The Printing Of Pi

It really isn’t necessary, but there is some geek cred to learning pi to some bizarre number of digits. One way to do that is via a piem — a mnemonic device that is easy to remember and gives you the digits. Don’t know any? [Roni Bandini] has you covered with the PiemPi machine. It prints a random piem on a thermal printer and calculates each digit on the fly. You can watch the machine in action in the video below.

Unfortunately, the Raspberry Pi Zero inside doesn’t have enough language skills to ensure the thing makes sense, so you get word salad that may or may not have any real meaning. For example, [Roni] quotes astronomer [Sir James Jeans’] phrase: “How I want a drink, alcoholic, of course, after the heavy lectures involving quantum mechanics.” Before the advent of calculators, we always used: “May I have a large container of coffee today?” In each case, you count the number of letters in each word to get the digits. However, some of the piems you can see from the machine start off with phrases like: “# leon a yahoo execution im actual total pit eagle detector christmas…”

Continue reading “The Printing Of Pi”