[Tutor] How to calculate pi with another formula?

Kent Johnson kent37 at tds.net
Thu Apr 14 14:30:52 CEST 2005


Dick Moores wrote:
> Now to my new question. I have an artist friend who knows an artist who 
> needs pi expressed in base 12. I don't know how many digits he needs, 
> but I think he'll take what he can get. Is there a way to use 
> math.log(x, base) with the decimal module to accomplish this? Or is 
> there another way? Or is there no way?

I think I would try to write a program that converts base-10 decimal fractions to base 12. Then feed 
it the output of a pi-generating program.

Kent



More information about the Tutor mailing list