From p.dalgaard@biostat.ku.dk  Mon Apr 26 13:57:21 1999
From: p.dalgaard@biostat.ku.dk (Peter Dalgaard BSA)
Date: 26 Apr 1999 14:57:21 +0200
Subject: [S] uniroot -- doesn't work recursively
In-Reply-To: Balasubramanian Narasimhan's message of "Sun, 25 Apr 1999 16:55:36 -0700 (PDT)"
References: <x2yajhh9in.fsf@blueberry.kubism.ku.dk> <19990425165536M.naras@stat.Stanford.EDU>
Message-ID: <x2r9p7v8su.fsf@blueberry.kubism.ku.dk>

Balasubramanian Narasimhan <naras@stat.stanford.edu> writes:

> >>>>> "Peter" == Peter Dalgaard BSA <p.dalgaard@biostat.ku.dk> writes:
> 
>     Peter> The only sensible thing to do to get this to work is to
>     Peter> rewite zeroin in C. According to the comments in the file,
>     Peter> it is a transcription of an Algol60 program, so it is
>     Peter> probably not hard to convert it to another Algol
>     Peter> descendant.
> 
> Agreed, but there's no need for a rewrite. A C version has been
> available in Netlib for some time.

Thanks for the pointer, Naras! 

Found, adapted and inserted (in my private source tree for now). It
wasn't a complete drop-in replacement since it didn't support max.iter
and didn't return convergence info, but close enough.

Unfortunately, closer inspection revealed that the Fortran-ness of
zeroin was not the only problem, there's also trouble with global
storage used by the wrapper routine. And since C doesn't have lexical
scoping, that stuff needs to be passed around via arguments. Oh
well...

-- 
   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