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

Function complex__tan

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

Source from the content-addressed store, hash-verified

114 return r;
115}
116inline Rcomplex complex__tan(Rcomplex z){
117 Rcomplex r ;
118 double x2, y2, den;
119 x2 = 2.0 * z.r;
120 y2 = 2.0 * z.i;
121 den = ::cos(x2) + ::cosh(y2);
122 r.r = ::sin(x2)/den;
123 /* any threshold between -log(DBL_EPSILON)
124 and log(DBL_XMAX) will do*/
125 if (ISNAN(y2) || ::fabs(y2) < 50.0)
126 r.i = ::sinh(y2)/den;
127 else
128 r.i = (y2 <0 ? -1.0 : 1.0);
129 return r ;
130}
131
132inline Rcomplex complex__asin(Rcomplex z)
133{

Callers 1

complex__tanhFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected