damjan kuzmic wrote:

> i would like to know how to write a formula that in excell looks like
> this:
> 
> A / EXP(-LN(2) * t)

>>> import math
>>> A = 1.23
>>> t = 4.56

Literally (math.log is the natural logarithm):
>>> A / math.exp(-math.log(2) * t)
29.013618196288864

However,
    exp(-x) == 1 / exp(x)
and
    exp(ln(a)*x) == a ** x
so you better spell it

>>> A * 2 ** t
29.013618196288864
 




_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to