Skip to content

Mathlib

2 messages · Brian Ripley, Kurt Hornik

#
It has been possible. Note that the header file has a switch 

/*-- Mathlib as part of R --  undefine this for standalone : */
#define MATHLIB_IN_R

which controls whether R error handling is used.

Now, I suspect that it may not be totally in a state where it can be
used separately in 1.0.0, as this may well not have been tested 
recently. It did work at some stage between 0.90.1 and 0.99.0, as
I tested it during the API changes, but there have been a lot
of changes since, and at least two of those (log1p and pnorm5) have
failed in the standalone case when I tried just now.

The other problem is that some careful configuring would be needed for
the settings of e.g. ISNAN.

Is it worth trying to set up a configure script and Makefile.in to build
a standalone libnmath.a?   I suspect Martyn is suggesting that it is?
2 days later
#
In a way, this had always been the plan, so I would say yes it is worth
the trouble.

One issue is the naming issue.  I'd still recommend `Rmath'.  We should
also try to standardized the header file procedure.  (E.g., by declaring
#include <Rmath.h> as the official way ...)

Most likely, this would require setting up a second configure.in in the
Rmath (nmath) srcdir, but that shouldn't be to hard ...

-k
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._