PI Revisited - again!

What Andre’s link caused

One idea that came up from a former colleague of mine, Christoph was to rebase the number PI to 27, allowing for a presentation in the form of letters of the alphabet. His first tackle at this was written in ruby:

pi = 14159265358979323846264338327950288419716939937510582097
alphabeth = []
"a".upto("z") { |x| alphabeth << x}
base = alphabeth.length
text = []

  pi, rest = pi.divmod(base)
  text << alphabeth[rest]
end until pi.zero?
puts text.reverse.join

A nice way to express what is also presented here at wikipedia.

After doing some research as to how I could rebase arbitrarily large numbers, my search was suddenly halted by a uber-geek page. Once more I had to accept that whatever silly way to waste your time you come up with, someone has done it before you, and even added some icing to the cake. May I present to you Dr. Mike’s Math, where you can search for arbitrary strings within the first 31,415,929 digits of Π. That’s a good start, I’d say! This is so geeky, I would think it is correct.</p>

Consequently, this case is closed. Really. I swear by eiπ!


comments powered by Disqus