Re: get number that is raised to the power of

2008-05-02 Thread Boris Borcic
Marc 'BlackJack' Rintsch wrote: On Fri, 02 May 2008 19:19:07 +1000, Astan Chee wrote: Hi, Im not sure if this is more of a math question or a python question. I have a variable in python: >>> v = 10.0**n is there a way to find the value of n if i know only v aside from str(v).split('+')[1]

Re: get number that is raised to the power of

2008-05-02 Thread Astan Chee
Python.Arno wrote: the "reverse" of a power to is logarithm so v = 10**n <=> math.log(v,10) = n Arno Im so ashamed of myself for not thinking in logs. I must be dreaming again. Thanks for the help. -- "Formulations of number theory: Complete, Consistent, Non-trivial. Choose two." Animal

Re: get number that is raised to the power of

2008-05-02 Thread Python.Arno
On 2 mei 2008, at 11:19, Astan Chee wrote: Hi, Im not sure if this is more of a math question or a python question. I have a variable in python: >>> v = 10.0**n is there a way to find the value of n if i know only v aside from str(v).split('+')[1] ? that seems like too much of a hack and I

Re: get number that is raised to the power of

2008-05-02 Thread Marc 'BlackJack' Rintsch
On Fri, 02 May 2008 19:19:07 +1000, Astan Chee wrote: > Hi, > Im not sure if this is more of a math question or a python question. I > have a variable in python: > >>> v = 10.0**n > is there a way to find the value of n if i know only v aside from > str(v).split('+')[1] ? that seems like too mu