MCPcopy Create free account
hub / github.com/RcppCore/Rcpp / complex__exp

Function complex__exp

inst/include/Rcpp/sugar/functions/complex.h:67–73  ·  view source on GitHub ↗

TODO: this does not use HAVE_C99_COMPLEX as in R, perhaps it should

Source from the content-addressed store, hash-verified

65inline double complex__Arg( Rcomplex x ){ return ::atan2(x.i, x.r); }
66// TODO: this does not use HAVE_C99_COMPLEX as in R, perhaps it should
67inline Rcomplex complex__exp( Rcomplex x){
68 Rcomplex y ;
69 double expx = ::exp(x.r);
70 y.r = expx * ::cos(x.i);
71 y.i = expx * ::sin(x.i);
72 return y ;
73}
74inline Rcomplex complex__log( Rcomplex x){
75 Rcomplex y ;
76 y.i = ::atan2(x.i, x.r);

Callers

nothing calls this directly

Calls 1

expFunction · 0.50

Tested by

no test coverage detected