|
Packit |
67cb25 |
.. index:: logarithm and related functions
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
Information on the properties of the Logarithm function can be found in
|
|
Packit |
67cb25 |
Abramowitz & Stegun, Chapter 4. The functions described in this section
|
|
Packit |
67cb25 |
are declared in the header file :file:`gsl_sf_log.h`.
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
.. function:: double gsl_sf_log (double x)
|
|
Packit |
67cb25 |
int gsl_sf_log_e (double x, gsl_sf_result * result)
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
These routines compute the logarithm of :data:`x`, :math:`\log(x)`, for
|
|
Packit |
67cb25 |
:math:`x > 0`.
|
|
Packit |
67cb25 |
.. Exceptional Return Values: GSL_EDOM
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
.. function:: double gsl_sf_log_abs (double x)
|
|
Packit |
67cb25 |
int gsl_sf_log_abs_e (double x, gsl_sf_result * result)
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
These routines compute the logarithm of the magnitude of :data:`x`,
|
|
Packit |
67cb25 |
:math:`\log(|x|)`, for :math:`x \ne 0`.
|
|
Packit |
67cb25 |
.. Exceptional Return Values: GSL_EDOM
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
.. function:: int gsl_sf_complex_log_e (double zr, double zi, gsl_sf_result * lnr, gsl_sf_result * theta)
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
This routine computes the complex logarithm of :math:`z = z_r + i z_i`.
|
|
Packit |
67cb25 |
The results are returned as :data:`lnr`, :data:`theta` such that
|
|
Packit |
67cb25 |
:math:`\exp(lnr + i \theta) = z_r + i z_i`, where :math:`\theta` lies in
|
|
Packit |
67cb25 |
the range :math:`[-\pi,\pi]`.
|
|
Packit |
67cb25 |
.. Exceptional Return Values: GSL_EDOM
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
.. function:: double gsl_sf_log_1plusx (double x)
|
|
Packit |
67cb25 |
int gsl_sf_log_1plusx_e (double x, gsl_sf_result * result)
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
These routines compute :math:`\log(1 + x)` for :math:`x > -1` using an
|
|
Packit |
67cb25 |
algorithm that is accurate for small :data:`x`.
|
|
Packit |
67cb25 |
.. Domain: x > -1.0
|
|
Packit |
67cb25 |
.. Exceptional Return Values: GSL_EDOM
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
.. function:: double gsl_sf_log_1plusx_mx (double x)
|
|
Packit |
67cb25 |
int gsl_sf_log_1plusx_mx_e (double x, gsl_sf_result * result)
|
|
Packit |
67cb25 |
|
|
Packit |
67cb25 |
These routines compute :math:`\log(1 + x) - x` for :math:`x > -1` using an
|
|
Packit |
67cb25 |
algorithm that is accurate for small :data:`x`.
|
|
Packit |
67cb25 |
.. Domain: x > -1.0
|
|
Packit |
67cb25 |
.. Exceptional Return Values: GSL_EDOM
|