This is pretty easy with PARI/GP
I use "gp" for almost everything because it's so fast and arbitrary precision.
gp understands decimal and can convert to binary for you so that makes all the power-of-two bases trivial.
For example, here is Pi in binary:
Code:
? Pi
%1 = 3.1415926535897932384626433832795028842
? binary(Pi)
%2 = [[1, 1], [0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 0, 1, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 0, 1, 1, 0, 0, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 1, 1, 0, 1, 0, 0, 0, 1]]
If you want Pi in octal just take groups of 3 binary digits.
You can dial up the precision as much as you want. A million decimal digits of Pi can be achieved with:
Code:
? \p 1000000
realprecision = 1000016 significant digits (1000000 digits displayed)
? Pi
%3 (1 million digits here)
You can get e by using exp(1). Here are 100 decimal digits:
Code:
? \p 100
realprecision = 115 significant digits (100 digits displayed)
? exp(1)
%3 = 2.718281828459045235360287471352662497757247093699959574966967627724076630353547594571382178525166427
Phi is also easy:
Code:
? phi = (1 + sqrt(5)) / 2
%4 = 1.618033988749894848204586834365638117720309179805762862135448622705260462818902449707207204189391137
For exotic constants you may need to script gp to expand a taylor series or similar. Then figuring out how far you have to go for your desired precision will take some math on your part.