ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
gsl::cpx Namespace Reference

The gsl::cpx namespace allows the gsl::complex static funtions to be called from a namespace and so allows the usual C++ convenience of using code like the following. More...

Functions

complex rect (double x, double y)
 C++ version of gsl_complex_rect(). More...
 
complex polar (double r, double theta)
 C++ version of gsl_complex_rect(). More...
 
double arg (complex const &z)
 C++ version of gsl_complex_arg(). More...
 
double abs (complex const &z)
 C++ version of gsl_complex_abs(). More...
 
double abs2 (complex const &z)
 C++ version of gsl_complex_abs2(). More...
 
double logabs (complex const &z)
 C++ version of gsl_complex_logabs(). More...
 
complex add (complex const &a, complex const &b)
 C++ version of gsl_complex_add(). More...
 
complex sub (complex const &a, complex const &b)
 C++ version of gsl_complex_sub(). More...
 
complex mul (complex const &a, complex const &b)
 C++ version of gsl_complex_mul(). More...
 
complex div (complex const &a, complex const &b)
 C++ version of gsl_complex_div(). More...
 
complex add_real (complex const &a, double x)
 C++ version of gsl_complex_add_real(). More...
 
complex sub_real (complex const &a, double x)
 C++ version of gsl_complex_sub_real(). More...
 
complex mul_real (complex const &a, double x)
 C++ version of gsl_complex_mul_real(). More...
 
complex div_real (complex const &a, double x)
 C++ version of gsl_complex_div_real(). More...
 
complex add_imag (complex const &a, double y)
 C++ version of gsl_complex_add_imag(). More...
 
complex sub_imag (complex const &a, double y)
 C++ version of gsl_complex_sub_imag(). More...
 
complex mul_imag (complex const &a, double y)
 C++ version of gsl_complex_mul_imag(). More...
 
complex div_imag (complex const &a, double y)
 C++ version of gsl_complex_div_imag(). More...
 
complex conjugate (complex const &z)
 C++ version of gsl_complex_conjugate(). More...
 
complex inverse (complex const &a)
 C++ version of gsl_complex_inverse(). More...
 
complex negative (complex const &a)
 C++ version of gsl_complex_negative(). More...
 
complex sqrt (complex const &z)
 C++ version of gsl_complex_sqrt(). More...
 
complex sqrt_real (double x)
 C++ version of gsl_complex_sqrt_real(). More...
 
complex pow (complex const &a, complex const &b)
 C++ version of gsl_complex_pow(). More...
 
complex pow_real (complex const &a, double b)
 C++ version of gsl_complex_pow_real(). More...
 
complex exp (complex const &a)
 C++ version of gsl_complex_exp(). More...
 
complex log (complex const &a)
 C++ version of gsl_complex_log(). More...
 
complex log10 (complex const &a)
 C++ version of gsl_complex_log10(). More...
 
complex log_b (complex const &a, complex const &b)
 C++ version of gsl_complex_log_b(). More...
 
complex sin (complex const &a)
 C++ version of gsl_complex_sin(). More...
 
complex cos (complex const &a)
 C++ version of gsl_complex_cos(). More...
 
complex sec (complex const &a)
 C++ version of gsl_complex_sec(). More...
 
complex csc (complex const &a)
 C++ version of gsl_complex_csc(). More...
 
complex tan (complex const &a)
 C++ version of gsl_complex_tan(). More...
 
complex cot (complex const &a)
 C++ version of gsl_complex_cot(). More...
 
complex arcsin (complex const &a)
 C++ version of gsl_complex_arcsin(). More...
 
complex arcsin_real (double a)
 C++ version of gsl_complex_arcsin_real(). More...
 
complex arccos (complex const &a)
 C++ version of gsl_complex_arccos(). More...
 
complex arccos_real (double a)
 C++ version of gsl_complex_arccos_real(). More...
 
complex arcsec (complex const &a)
 C++ version of gsl_complex_arcsec(). More...
 
complex arcsec_real (double a)
 C++ version of gsl_complex_arcsec_real(). More...
 
complex arccsc (complex const &a)
 C++ version of gsl_complex_arccsc(). More...
 
complex arccsc_real (double a)
 C++ version of gsl_complex_arccsc_real(). More...
 
complex arctan (complex const &a)
 C++ version of gsl_complex_arctan(). More...
 
complex arccot (complex const &a)
 C++ version of gsl_complex_arccot(). More...
 
complex sinh (complex const &a)
 C++ version of gsl_complex_sinh(). More...
 
complex cosh (complex const &a)
 C++ version of gsl_complex_cosh(). More...
 
complex sech (complex const &a)
 C++ version of gsl_complex_sech(). More...
 
complex csch (complex const &a)
 C++ version of gsl_complex_csch(). More...
 
complex tanh (complex const &a)
 C++ version of gsl_complex_tanh(). More...
 
complex coth (complex const &a)
 C++ version of gsl_complex_coth(). More...
 
complex arcsinh (complex const &a)
 C++ version of gsl_complex_arcsinh(). More...
 
complex arccosh (complex const &a)
 C++ version of gsl_complex_arccosh(). More...
 
complex arccosh_real (double a)
 C++ version of gsl_complex_arccosh_real(). More...
 
complex arcsech (complex const &a)
 C++ version of gsl_complex_arcsech(). More...
 
complex arccsch (complex const &a)
 C++ version of gsl_complex_arccsch(). More...
 
complex arctanh (complex const &a)
 C++ version of gsl_complex_arctanh(). More...
 
complex arctanh_real (double a)
 C++ version of gsl_complex_arctanh_real(). More...
 
complex arccoth (complex const &a)
 C++ version of gsl_complex_arccoth(). More...
 

Detailed Description

The gsl::cpx namespace allows the gsl::complex static funtions to be called from a namespace and so allows the usual C++ convenience of using code like the following.

using namespace gsl;
using namespace gsl::cpx;
complex z = rect( 3, 1 );
complex w = sin( z );
This class handles complex numbers.
Definition: complex.hpp:42
The gsl::cpx namespace allows the gsl::complex static funtions to be called from a namespace and so a...
Definition: complex.hpp:772
complex sin(complex const &a)
C++ version of gsl_complex_sin().
Definition: complex.hpp:992
complex rect(double x, double y)
C++ version of gsl_complex_rect().
Definition: complex.hpp:779
The gsl package creates an interface to the GNU Scientific Library for C++.
Definition: blas.hpp:34

Function Documentation

◆ abs()

double gsl::cpx::abs ( complex const &  z)
inline

C++ version of gsl_complex_abs().

Parameters
zA complex number
Returns
The magnitude of z

Definition at line 798 of file complex.hpp.

References gsl::complex::abs().

◆ abs2()

double gsl::cpx::abs2 ( complex const &  z)
inline

C++ version of gsl_complex_abs2().

Parameters
zA complex number
Returns
The square of the magnitude of z

Definition at line 804 of file complex.hpp.

References gsl::complex::abs2().

◆ add()

complex gsl::cpx::add ( complex const &  a,
complex const &  b 
)
inline

C++ version of gsl_complex_add().

Parameters
aA complex number
bA complex to add to a
Returns
The sum

Definition at line 817 of file complex.hpp.

References gsl::sf::mathieu::a(), gsl::complex::add(), and gsl::sf::mathieu::b().

◆ add_imag()

complex gsl::cpx::add_imag ( complex const &  a,
double  y 
)
inline

C++ version of gsl_complex_add_imag().

Parameters
aA complex number
yThe imaginary part of a double to add to a
Returns
The sum

Definition at line 881 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::add_imag().

◆ add_real()

complex gsl::cpx::add_real ( complex const &  a,
double  x 
)
inline

C++ version of gsl_complex_add_real().

Parameters
aA complex number
xA double to add to a
Returns
The sum

Definition at line 849 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::add_real().

◆ arccos()

complex gsl::cpx::arccos ( complex const &  a)
inline

C++ version of gsl_complex_arccos().

Parameters
aA complex number
Returns
The inverse cosine

Definition at line 1048 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arccos().

◆ arccos_real()

complex gsl::cpx::arccos_real ( double  a)
inline

C++ version of gsl_complex_arccos_real().

Parameters
aA double
Returns
The inverse cosine

Definition at line 1055 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arccos_real().

◆ arccosh()

complex gsl::cpx::arccosh ( complex const &  a)
inline

C++ version of gsl_complex_arccosh().

Parameters
aA complex number
Returns
The inverse hypebolic cosine

Definition at line 1153 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arccosh().

◆ arccosh_real()

complex gsl::cpx::arccosh_real ( double  a)
inline

C++ version of gsl_complex_arccosh_real().

Parameters
aA double
Returns
The inverse hypebolic cosine

Definition at line 1160 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arccosh_real().

◆ arccot()

complex gsl::cpx::arccot ( complex const &  a)
inline

C++ version of gsl_complex_arccot().

Parameters
aA complex number
Returns
the inverse cotangent

Definition at line 1097 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arccot().

◆ arccoth()

complex gsl::cpx::arccoth ( complex const &  a)
inline

C++ version of gsl_complex_arccoth().

Parameters
aA complex number
Returns
The inverse hyperbolic cotangent

Definition at line 1195 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arccoth().

◆ arccsc()

complex gsl::cpx::arccsc ( complex const &  a)
inline

C++ version of gsl_complex_arccsc().

Parameters
aA complex number
Returns
The inverse cosecant

Definition at line 1076 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arccsc().

◆ arccsc_real()

complex gsl::cpx::arccsc_real ( double  a)
inline

C++ version of gsl_complex_arccsc_real().

Parameters
aA double
Returns
The inverse cosecant

Definition at line 1083 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arccsc_real().

◆ arccsch()

complex gsl::cpx::arccsch ( complex const &  a)
inline

C++ version of gsl_complex_arccsch().

Parameters
aA complex number
Returns
The inverse hyperbolic cosecant

Definition at line 1174 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arccsch().

◆ arcsec()

complex gsl::cpx::arcsec ( complex const &  a)
inline

C++ version of gsl_complex_arcsec().

Parameters
aA complex number
Returns
The inverse secant

Definition at line 1062 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arcsec().

◆ arcsec_real()

complex gsl::cpx::arcsec_real ( double  a)
inline

C++ version of gsl_complex_arcsec_real().

Parameters
aA double
Returns
The inverse secant

Definition at line 1069 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arcsec_real().

◆ arcsech()

complex gsl::cpx::arcsech ( complex const &  a)
inline

C++ version of gsl_complex_arcsech().

Parameters
aA complex number
Returns
The inverse hyperbolic secant

Definition at line 1167 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arcsech().

◆ arcsin()

complex gsl::cpx::arcsin ( complex const &  a)
inline

C++ version of gsl_complex_arcsin().

Parameters
aA complex number
Returns
The inverse sine

Definition at line 1034 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arcsin().

◆ arcsin_real()

complex gsl::cpx::arcsin_real ( double  a)
inline

C++ version of gsl_complex_arcsin_real().

Parameters
aA double
Returns
The inverse sine

Definition at line 1041 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arcsin_real().

◆ arcsinh()

complex gsl::cpx::arcsinh ( complex const &  a)
inline

C++ version of gsl_complex_arcsinh().

Parameters
aA complex number
Returns
The inverse hypebolic sine

Definition at line 1146 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arcsinh().

◆ arctan()

complex gsl::cpx::arctan ( complex const &  a)
inline

C++ version of gsl_complex_arctan().

Parameters
aA complex number
Returns
the inverse tangent

Definition at line 1090 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arctan().

◆ arctanh()

complex gsl::cpx::arctanh ( complex const &  a)
inline

C++ version of gsl_complex_arctanh().

Parameters
aA complex number
Returns
The inverse hyperbolic tangent

Definition at line 1181 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arctanh().

◆ arctanh_real()

complex gsl::cpx::arctanh_real ( double  a)
inline

C++ version of gsl_complex_arctanh_real().

Parameters
aA double
Returns
The inverse hyperbolic tangent

Definition at line 1188 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::arctanh_real().

◆ arg()

double gsl::cpx::arg ( complex const &  z)
inline

C++ version of gsl_complex_arg().

Parameters
zA complex number
Returns
The argument of z

Definition at line 792 of file complex.hpp.

References gsl::complex::arg().

Referenced by gsl::sf::lngamma_complex_e().

◆ conjugate()

complex gsl::cpx::conjugate ( complex const &  z)
inline

C++ version of gsl_complex_conjugate().

Parameters
zA complex number
Returns
The complex conjugate

Definition at line 912 of file complex.hpp.

References gsl::complex::conjugate().

◆ cos()

complex gsl::cpx::cos ( complex const &  a)
inline

C++ version of gsl_complex_cos().

Parameters
aA complex number
Returns
The cosine

Definition at line 999 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::cos().

Referenced by gsl::complex::polar(), gsl::complex_float::polar(), and gsl::complex_long_double::polar().

◆ cosh()

complex gsl::cpx::cosh ( complex const &  a)
inline

C++ version of gsl_complex_cosh().

Parameters
aA complex number
Returns
The hyperbolic cosine

Definition at line 1111 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::cosh().

◆ cot()

complex gsl::cpx::cot ( complex const &  a)
inline

C++ version of gsl_complex_cot().

Parameters
aA complex number
Returns
The cotangent

Definition at line 1027 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::cot().

◆ coth()

complex gsl::cpx::coth ( complex const &  a)
inline

C++ version of gsl_complex_coth().

Parameters
aA complex number
Returns
The hyperbolic cotangent

Definition at line 1139 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::coth().

◆ csc()

complex gsl::cpx::csc ( complex const &  a)
inline

C++ version of gsl_complex_csc().

Parameters
aA complex number
Returns
The cosecant

Definition at line 1013 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::csc().

◆ csch()

complex gsl::cpx::csch ( complex const &  a)
inline

C++ version of gsl_complex_csch().

Parameters
aA complex number
Returns
The hyperbolic cosecant

Definition at line 1125 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::csch().

◆ div()

complex gsl::cpx::div ( complex const &  a,
complex const &  b 
)
inline

C++ version of gsl_complex_div().

Parameters
aA complex number
bA complex to divide a by
Returns
The quotient

Definition at line 841 of file complex.hpp.

References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), and gsl::complex::div().

◆ div_imag()

complex gsl::cpx::div_imag ( complex const &  a,
double  y 
)
inline

C++ version of gsl_complex_div_imag().

Parameters
aA complex number
yThe imaginary part of a double to divide a by
Returns
The quotient

Definition at line 905 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::div_imag().

◆ div_real()

complex gsl::cpx::div_real ( complex const &  a,
double  x 
)
inline

C++ version of gsl_complex_div_real().

Parameters
aA complex number
xA double to divide a by
Returns
The quotient

Definition at line 873 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::div_real().

◆ exp()

complex gsl::cpx::exp ( complex const &  a)
inline

C++ version of gsl_complex_exp().

Parameters
aA complex number
Returns
The exponential function of z

Definition at line 963 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::exp().

Referenced by gsl::siman< XP >::solve(), and gsl::siman< XP >::solve_many().

◆ inverse()

complex gsl::cpx::inverse ( complex const &  a)
inline

C++ version of gsl_complex_inverse().

Parameters
aA complex number
Returns
The inverse

Definition at line 919 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::inverse().

Referenced by gsl::linalg::complex_LU_invert(), and gsl::linalg::LU_invert().

◆ log()

complex gsl::cpx::log ( complex const &  a)
inline

C++ version of gsl_complex_log().

Parameters
aA complex number
Returns
The natural logarithm

Definition at line 970 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::log().

◆ log10()

complex gsl::cpx::log10 ( complex const &  a)
inline

C++ version of gsl_complex_log10().

Parameters
aA complex number
Returns
The base 10 logarithm

Definition at line 977 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::log10().

◆ log_b()

complex gsl::cpx::log_b ( complex const &  a,
complex const &  b 
)
inline

C++ version of gsl_complex_log_b().

Parameters
aA complex number
bA complex number
Returns
The complex baseb logarithm

Definition at line 985 of file complex.hpp.

References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), and gsl::complex::log_b().

◆ logabs()

double gsl::cpx::logabs ( complex const &  z)
inline

C++ version of gsl_complex_logabs().

Parameters
zA complex number
Returns
the natural logarithm of the magnitude of z

Definition at line 810 of file complex.hpp.

References gsl::complex::logabs().

◆ mul()

complex gsl::cpx::mul ( complex const &  a,
complex const &  b 
)
inline

C++ version of gsl_complex_mul().

Parameters
aA complex number
bA complex to multiply by a
Returns
The product

Definition at line 833 of file complex.hpp.

References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), and gsl::complex::mul().

◆ mul_imag()

complex gsl::cpx::mul_imag ( complex const &  a,
double  y 
)
inline

C++ version of gsl_complex_mul_imag().

Parameters
aA complex number
yThe imaginary part of a double to multiply a by
Returns
The product

Definition at line 897 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::mul_imag().

◆ mul_real()

complex gsl::cpx::mul_real ( complex const &  a,
double  x 
)
inline

C++ version of gsl_complex_mul_real().

Parameters
aA complex number
xA double to multiply a by
Returns
The product

Definition at line 865 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::mul_real().

◆ negative()

complex gsl::cpx::negative ( complex const &  a)
inline

C++ version of gsl_complex_negative().

Parameters
aA complex number
Returns
The negative

Definition at line 926 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::negative().

◆ polar()

complex gsl::cpx::polar ( double  r,
double  theta 
)
inline

C++ version of gsl_complex_rect().

Parameters
rThe magnitude
thetaThe argument
Returns
complex

Definition at line 786 of file complex.hpp.

References gsl::complex::polar().

◆ pow()

complex gsl::cpx::pow ( complex const &  a,
complex const &  b 
)
inline

C++ version of gsl_complex_pow().

Parameters
aA complex number
bAnother complex number
Returns
\(a^b\)

Definition at line 948 of file complex.hpp.

References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), and gsl::complex::pow().

◆ pow_real()

complex gsl::cpx::pow_real ( complex const &  a,
double  b 
)
inline

C++ version of gsl_complex_pow_real().

Parameters
aA complex number
bA double
Returns
\(a^b\)

Definition at line 956 of file complex.hpp.

References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), and gsl::complex::pow_real().

◆ rect()

complex gsl::cpx::rect ( double  x,
double  y 
)
inline

C++ version of gsl_complex_rect().

Parameters
xReal part
yImaginary part
Returns
complex

Definition at line 779 of file complex.hpp.

References gsl::complex::rect().

◆ sec()

complex gsl::cpx::sec ( complex const &  a)
inline

C++ version of gsl_complex_sec().

Parameters
aA complex number
Returns
The secant

Definition at line 1006 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::sec().

◆ sech()

complex gsl::cpx::sech ( complex const &  a)
inline

C++ version of gsl_complex_sech().

Parameters
aA complex number
Returns
The hyperbolic secant

Definition at line 1118 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::sech().

◆ sin()

complex gsl::cpx::sin ( complex const &  a)
inline

C++ version of gsl_complex_sin().

Parameters
aA complex number
Returns
The sine

Definition at line 992 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::sin().

Referenced by gsl::complex::polar(), gsl::complex_float::polar(), and gsl::complex_long_double::polar().

◆ sinh()

complex gsl::cpx::sinh ( complex const &  a)
inline

C++ version of gsl_complex_sinh().

Parameters
aA complex number
Returns
The hyperbolic sine

Definition at line 1104 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::sinh().

◆ sqrt()

complex gsl::cpx::sqrt ( complex const &  z)
inline

C++ version of gsl_complex_sqrt().

Parameters
zA complex number
Returns
The square root

Definition at line 933 of file complex.hpp.

References gsl::complex::sqrt().

◆ sqrt_real()

complex gsl::cpx::sqrt_real ( double  x)
inline

C++ version of gsl_complex_sqrt_real().

Parameters
xA double
Returns
The complex square root

Definition at line 940 of file complex.hpp.

References gsl::complex::sqrt_real().

◆ sub()

complex gsl::cpx::sub ( complex const &  a,
complex const &  b 
)
inline

C++ version of gsl_complex_sub().

Parameters
aA complex number
bA complex to subtract from a
Returns
The difference

Definition at line 825 of file complex.hpp.

References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), and gsl::complex::sub().

◆ sub_imag()

complex gsl::cpx::sub_imag ( complex const &  a,
double  y 
)
inline

C++ version of gsl_complex_sub_imag().

Parameters
aA complex number
yThe imaginary part of a double to subtract from a
Returns
The difference

Definition at line 889 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::sub_imag().

◆ sub_real()

complex gsl::cpx::sub_real ( complex const &  a,
double  x 
)
inline

C++ version of gsl_complex_sub_real().

Parameters
aA complex number
xA double to add to a
Returns
The sum

Definition at line 857 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::sub_real().

◆ tan()

complex gsl::cpx::tan ( complex const &  a)
inline

C++ version of gsl_complex_tan().

Parameters
aA complex number
Returns
The tangent

Definition at line 1020 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::tan().

◆ tanh()

complex gsl::cpx::tanh ( complex const &  a)
inline

C++ version of gsl_complex_tanh().

Parameters
aA complex number
Returns
The hyperbolic tangent

Definition at line 1132 of file complex.hpp.

References gsl::sf::mathieu::a(), and gsl::complex::tanh().