[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [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*.