From p.dalgaard@biostat.ku.dk  Mon Apr 26 14:27:29 1999
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 26 Apr 1999 15:27:29 +0200
Subject: [S] uniroot -- doesn't work recursively
In-Reply-To: Martin Maechler's message of "Mon, 26 Apr 1999 15:19:37 +0200"
References: <x2yajhh9in.fsf@blueberry.kubism.ku.dk> <19990425165536M.naras@stat.Stanford.EDU> <x2r9p7v8su.fsf@blueberry.kubism.ku.dk> <199904261319.PAA04686@sophie.ethz.ch>
Message-ID: <x2pv4rv7em.fsf@blueberry.kubism.ku.dk>

Martin Maechler <maechler@stat.math.ethz.ch> writes:

>     PD> zeroin was not the only problem, there's also trouble with global
>     PD> storage used by the wrapper routine. And since C doesn't have
>     PD> lexical scoping, that stuff needs to be passed around via
>     PD> arguments. Oh well...
> 
> yes (I think that's what the comment in optimize.c [the wrapper] meant
>      that I had cited here...).
> and  YES  it would be really nice if that could be done, finally.

It is done now. (Actually took about as much time as writing the email
griping about it...)

>      uniroot(f.dev, interval=interv, y=y, crit=crit)     
$root
[1] 0.05408745

$f.root
[1] 0.0009728222

$iter
[1] 5

$estim.prec
[1] 6.103516e-05

I'll commit my stuff in a moment.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk)             FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._


[S] uniroot -- doesn't work recursively
Peter Dalgaard BSA