Bases of Pi

Bases of Pi

As I was falling asleep last night I started wondering whether pi looked more interesting in other bases. I took the first 50 digits (in base 10) of pi and made a bignum out of it and looped from base 2 to 36 and printed it out. Since I only have integer support still, I had to drop the decimal point. Anyway, there's nothing terribly interesting to be seen. In base 32 the "word" undocs appears and base 31 says sack. Not that interesting. Maybe if I expand it a bit. I'll try that later.

So, is there such a thing as a fractional base? Hmm. I guess if I used a pi base, then pi would simply be 1. Easy, huh? Pretty much everything else would be a whole lot messier though. Probably not worth it. Anyway, here's the code (that uses bigmath) to produce the output seen above.

Subscribe to A garage sale for your mind

Don’t miss out on the latest posts. Sign up now to get access to the library of members-only posts.
[email protected]
Subscribe