GNU Scientific Library – Reference Manual: Logarithm and Related Functions

Next: Mathieu Functions, Previous: Legendre Functions and Spherical Harmonics, Up: Special Functions [Index]

### 7.25 Logarithm and Related Functions

Information on the properties of the Logarithm function can be found in Abramowitz & Stegun, Chapter 4. The functions described in this section are declared in the header file `gsl_sf_log.h`.

Function: double gsl_sf_log (double x)
Function: int gsl_sf_log_e (double x, gsl_sf_result * result)

  These routines compute the logarithm of x, \log(x), for x > 0.

Function: double gsl_sf_log_abs (double x)
Function: int gsl_sf_log_abs_e (double x, gsl_sf_result * result)

  These routines compute the logarithm of the magnitude of x, \log(|x|), for x \ne 0.

Function: int gsl_sf_complex_log_e (double zr, double zi, gsl_sf_result * lnr, gsl_sf_result * theta)

  This routine computes the complex logarithm of z = z_r + i z_i. The results are returned as lnr, theta such that \exp(lnr + i \theta) = z_r + i z_i, where \theta lies in the range [-\pi,\pi].

Function: double gsl_sf_log_1plusx (double x)
Function: int gsl_sf_log_1plusx_e (double x, gsl_sf_result * result)

  These routines compute \log(1 + x) for x > -1 using an algorithm that is accurate for small x.

Function: double gsl_sf_log_1plusx_mx (double x)
Function: int gsl_sf_log_1plusx_mx_e (double x, gsl_sf_result * result)

  These routines compute \log(1 + x) - x for x > -1 using an algorithm that is accurate for small x.