math-functions-0.1.7.0: Special functions and Chebyshev polynomials

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

Numeric.SpecFunctions.Extra

Description

Less common mathematical functions.

Synopsis

Documentation

bd0

Arguments

:: Double
x
-> Double
np
-> Double 

Evaluate the deviance term x log(x/np) + np - x.

chooseExact :: Int -> Int -> Double

Calculate binomial coefficient using exact formula

logChooseFast :: Double -> Double -> Double

Quickly compute the natural logarithm of n choose k, with no checking.

Less numerically stable:

exp $ lg (n+1) - lg (k+1) - lg (n-k+1)
  where lg = logGamma . fromIntegral