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

Function complex__asin

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

Source from the content-addressed store, hash-verified

130}
131
132inline Rcomplex complex__asin(Rcomplex z)
133{
134 Rcomplex r ;
135 double alpha, bet, t1, t2, x, y;
136 x = z.r;
137 y = z.i;
138 t1 = 0.5 * ::hypot(x + 1, y);
139 t2 = 0.5 * ::hypot(x - 1, y);
140 alpha = t1 + t2;
141 bet = t1 - t2;
142 r.r = ::asin(bet);
143 r.i = ::log(alpha + ::sqrt(alpha*alpha - 1));
144 if(y < 0 || (y == 0 && x > 1)) r.i *= -1;
145 return r ;
146}
147
148inline Rcomplex complex__acos(Rcomplex z)
149{

Callers 2

complex__acosFunction · 0.85
complex__asinhFunction · 0.85

Calls 3

hypotFunction · 0.85
logFunction · 0.50
sqrtFunction · 0.50

Tested by

no test coverage detected