[S] uniroot -- doesn't work recursively

Peter Dalgaard BSA p.dalgaard@biostat.ku.dk
26 Apr 1999 14:57:21 +0200

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

   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