Displaying 2 results from an estimated 2 matches for "z_tan".
Did you mean:
z_atan
2005 Apr 07
1
complex tangent (PR#7781)
...246.187.164)
When the imaginary part of the argument is very large, the complex tangent
function returns 0+NaNi. For example, tan(1+1000i)=0+NaNi; it should be 0+1i
Easy to fix in complex.c, as the original NaN came from division of sinh and
cosh that had reached machine infinity.
static void z_tan(Rcomplex *r, Rcomplex *z)
{
double x2, y2, den;
x2 = 2.0 * z->r;
y2 = 2.0 * z->i;
den = cos(x2) + cosh(y2);
r->r = sin(x2)/den;
/* any limit above about log(DBL_EPSILON) will do */
if (fabs(r->i) < 40.0)
r->i = sinh(y2)/den;
else
r->...
2005 Sep 10
1
FreeBSD 7.0-CURRENT and R-2.2.0 alpha
...csqrt'
complex.o(.text+0xc18): In function `z_cos':
/usr/local/R-alpha/src/main/complex.c:486: undefined reference to `ccos'
complex.o(.text+0xc38): In function `z_sin':
/usr/local/R-alpha/src/main/complex.c:491: undefined reference to `csin'
complex.o(.text+0xc5e): In function `z_tan':
/usr/local/R-alpha/src/main/complex.c:497: undefined reference to `ctan'
complex.o(.text+0xd26): In function `z_atan2':
/usr/local/R-alpha/src/main/complex.c:523: undefined reference to `catan'
complex.o(.text+0xe18): In function `z_asin':
/usr/local/R-alpha/src/main/complex.c...