statistics-0.13.3.0: A library of statistical types, data, and functions

Copyright(c) 2011 Bryan O'Sullivan
LicenseBSD3
Maintainerbos@serpentine.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Statistics.Math.RootFinding

Contents

Description

Haskell functions for finding the roots of mathematical functions.

Synopsis

Documentation

data Root a Source

The result of searching for a root of a mathematical function.

Constructors

NotBracketed

The function does not have opposite signs when evaluated at the lower and upper bounds of the search.

SearchFailed

The search failed to converge to within the given error tolerance after the given number of iterations.

Root a

A root was successfully found.

Instances

Monad Root Source 
Functor Root Source 
Applicative Root Source 
Alternative Root Source 
MonadPlus Root Source 
Eq a => Eq (Root a) Source 
Data a => Data (Root a) Source 
Read a => Read (Root a) Source 
Show a => Show (Root a) Source 
Generic (Root a) Source 
Binary a => Binary (Root a) Source 
ToJSON a => ToJSON (Root a) Source 
FromJSON a => FromJSON (Root a) Source 
type Rep (Root a) Source 

fromRoot Source

Arguments

:: a

Default value.

-> Root a

Result of search for a root.

-> a 

Returns either the result of a search for a root, or the default value if the search failed.

ridders Source

Arguments

:: Double

Absolute error tolerance.

-> (Double, Double)

Lower and upper bounds for the search.

-> (Double -> Double)

Function to find the roots of.

-> Root Double 

Use the method of Ridders to compute a root of a function.

The function must have opposite signs when evaluated at the lower and upper bounds of the search (i.e. the root must be bracketed).

References

  • Ridders, C.F.J. (1979) A new algorithm for computing a single root of a real continuous function. IEEE Transactions on Circuits and Systems 26:979–980.