[Numpy-discussion] New ufuncs

David Cournapeau david at ar.media.kyoto-u.ac.jp
Wed Nov 5 01:48:42 EST 2008


Charles R Harris wrote:
>
> Hmm... but I'm thinking one has to be clever here because the main
> reason I heard for using logs was that normal floating point numbers
> had insufficient range. So maybe something like
>
> logadd(a,b) = a + log(1 + exp(b - a))
>
> where a > b ?
>

Yes, that's the idea. AFAIK, that's generally known as logsumexp
algorithm, at least in the machine learning community, I opened a task
ticket on it, but I have not done any work on it:

http://projects.scipy.org/scipy/numpy/ticket/765

cheers,

David



More information about the NumPy-Discussion mailing list