Skip to content
Back to formatted view

Raw Message

Message-ID: <C571EEAF-1E8E-49CB-834E-4930EAB34C72@xs4all.nl>
Date: 2012-09-20T14:18:27Z
From: Berend Hasselman
Subject: Problem with Newton_Raphson
In-Reply-To: <F40CBE73-D16F-4224-9DB5-E3488C80D261@xs4all.nl>

On 20-09-2012, at 16:06, Berend Hasselman wrote:

> 
> On 20-09-2012, at 15:17, Christopher Kelvin wrote:
> 
> .....
> A final remark on function z:
> 
> - do not calculate things like n*sum(s) repeatedly: doing something like A<-n*sum(s) and reusing A is more efficient.
> - same thing for log((exp(-(scale)*sum(x)))) (recalculated four times)
> - same thing for sum(x)
> 

Oops!
No not four times. Twice.
But (exp(-(scale)*sum(x))) is calculated three times.

Berend