[R-pkg-devel] Complex Math Functions in C

Oliver Madsen o||ver@p@m@d@en @end|ng |rom gm@||@com
Sat Feb 27 10:03:22 CET 2021

Complex arithmetic seems to be part of "src/main/complex.c" (all of main is
not exposed to developers).

Rcpp does have quite a bit (if not all?) of the complex math implemented
already though, so if you are not set on using C, you could instead work
with ComplexVectors in Rcpp (see the online documentation:
If worse comes to worse and something you need isn't implemented, you could
check if it is implemented in std::complex.


On Sat, Feb 27, 2021 at 6:04 AM Andrew Simmons <akwsimmo using gmail.com> wrote:

> Hello,
> I've been trying to translate some of my slow R code into C code, and I
> need the complex math functions to be able to do this. I assumed I could
> access them with
> #include <R_ext/Complex.h>
> but it seems as though that file only contains the definition of structure
> Rcomplex. Any help accessing these functions would be greatly appreciated!
>         [[alternative HTML version deleted]]
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

	[[alternative HTML version deleted]]

More information about the R-package-devel mailing list