off topic but please forgive me me and answer
Patrick Maupin
pmaupin at gmail.com
Fri Apr 2 01:25:37 EDT 2010
On Apr 1, 11:52 pm, Dennis Lee Bieber <wlfr... at ix.netcom.com> wrote:
> On Thu, 01 Apr 2010 22:44:51 +0200, superpollo <ute... at esempio.net>
> declaimed the following in gmane.comp.python.general:
>
> > how much is one half times one half?
>
> import math
> print math.exp((math.log(1) - math.log(2))
> + (math.log(1) - math.log(2)))
That's all well and good, but base 'e' is kind of complicated. Some
of us were using base 10, and others took Tim's lead and were using
base 2:
>>> print math.exp(((math.log(1)/math.log(2) - math.log(2)/math.log(2)) + (math.log(1)/math.log(2) - math.log(2)/math.log(2)))*math.log(2))
0.25
More information about the Python-list
mailing list