コード例 #1
0
ファイル: math.c プロジェクト: AlexWoroschilow/wurst-alphabet
gsl_complex gsl_complex_arctanh(gsl_complex a)
{				/* z = arctanh(a) */
    if (GSL_IMAG(a) == 0.0) {
	return gsl_complex_arctanh_real(GSL_REAL(a));
    } else {
	gsl_complex z = gsl_complex_mul_imag(a, 1.0);
	z = gsl_complex_arctan(z);
	z = gsl_complex_mul_imag(z, -1.0);
	return z;
    }
}
コード例 #2
0
ファイル: gsl-complex.c プロジェクト: Ghnuberath/gnumeric
void
gsl_complex_arctanh (complex_t const *a, complex_t *res)
{                               /* z = arctanh(a) */
        if (GSL_IMAG (a) == 0.0) {
	        gsl_complex_arctanh_real (GSL_REAL (a), res);
	} else {
	         gsl_complex_mul_imag (a, 1.0, res);
		 gsl_complex_arctan (res, res);
		 gsl_complex_mul_imag (res, -1.0, res);
	}
}