[Numpy-discussion] New ufuncs

David Cournapeau david@ar.media.kyoto-u.ac...
Wed Nov 5 00:48:42 CST 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:




More information about the Numpy-discussion mailing list