hmatrix-gsl-0.19.0.1: Numerical computation

Copyright | (c) Alberto Ruiz 2006
License | GPL
Maintainer | Alberto Ruiz
Stability | provisional
Safe Haskell | None
Language | Haskell2010

Numeric.GSL.Differentiation

Description

Numerical differentiation.

http://www.gnu.org/software/gsl/manual/html_node/Numerical-Differentiation.html#Numerical-Differentiation

From the GSL manual: "The functions described in this chapter compute numerical derivatives by finite differencing. An adaptive algorithm is used to find the best choice of finite difference and to estimate the error in the derivative."

Synopsis

- derivCentral :: Double -> (Double -> Double) -> Double -> (Double, Double)
- derivForward :: Double -> (Double -> Double) -> Double -> (Double, Double)
- derivBackward :: Double -> (Double -> Double) -> Double -> (Double, Double)

# Documentation

derivCentral Source #

Arguments

:: Double | initial step size
-> (Double -> Double) | function
-> Double | point where the derivative is taken
-> (Double, Double) | result and absolute error

Adaptive central difference algorithm, gsl_deriv_central. For example:

    >>> let deriv = derivCentral 0.01
    >>> deriv sin (pi/4)
    (0.7071067812000676,1.0600063101654055e-10)
    >>> cos (pi/4)
    0.7071067811865476

derivForward Source #

Arguments

:: Double | initial step size
-> (Double -> Double) | function
-> Double | point where the derivative is taken
-> (Double, Double) | result and absolute error

Adaptive forward difference algorithm, gsl_deriv_forward. The function is evaluated only at points greater than x, and never at x itself. The derivative is returned in result and an estimate of its absolute error is returned in abserr. This function should be used if f(x) has a discontinuity at x, or is undefined for values less than x. A backward derivative can be obtained using a negative step.

derivBackward Source #

Arguments

:: Double | initial step size
-> (Double -> Double) | function
-> Double | point where the derivative is taken
-> (Double, Double) | result and absolute error

Adaptive backward difference algorithm, gsl_deriv_backward.