Re: [R] logsumexp function in R

2011-02-17 Thread Spencer Graves
On 2/17/2011 3:49 PM, William Dunlap wrote: -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Petr Savicky Sent: Wednesday, February 16, 2011 10:46 PM To: r-help@r-project.org Subject: Re: [R] logsumexp function in R On Wed, Feb 16

Re: [R] logsumexp function in R

2011-02-17 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Petr Savicky > Sent: Wednesday, February 16, 2011 10:46 PM > To: r-help@r-project.org > Subject: Re: [R] logsumexp function in R > > On Wed, Feb 16,

Re: [R] logsumexp function in R

2011-02-16 Thread Petr Savicky
On Wed, Feb 16, 2011 at 04:14:38PM -0500, Brian Tsai wrote: > Hi, > > I was wondering if anyone has implemented a numerically stable function to > compute log(sum(exp(x))) ? Try the following log(sum(exp(x - max(x + max(x) If this is not sufficient, consider using CRAN package Rmpfr with

[R] logsumexp function in R

2011-02-16 Thread Brian Tsai
Hi, I was wondering if anyone has implemented a numerically stable function to compute log(sum(exp(x))) ? Thanks! Brian [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLE