Special functions and Chebyshev polynomials

Version on this page:
LTS Haskell 22.12:
Stackage Nightly 2024-02-26:
Latest on Hackage:

See all snapshots math-functions appears in

BSD-3-Clause licensed by Bryan O'Sullivan, Aleksey Khudyakov
Maintained by Bryan O'Sullivan
This version can be pinned in stack with:math-functions-,2503

math-functions: efficient, special purpose mathematical functions

This package provides a number of special-purpose mathematical functions used in statistical and numerical computing.

Where possible, we give citations and computational complexity estimates for the algorithms used.

Get involved!

Please report bugs via the github issue tracker.

Master git mirror:

  • git clone git://

There’s also a Mercurial mirror:

  • hg clone

(You can create and contribute changes using either Mercurial or git.)


This library is written and maintained by Bryan O’Sullivan [email protected] and Aleksey Khudyakov [email protected].


Changes in

  • Module statistics: Statistics.Function.Comparison moved to Numeric.MathFunctions.Comparison. Old implementation if within compared negative numbers incorrectly.

  • addUlps and ulpDistance added to Numeric.MathFunctions.Comparison.

  • relativeError and eqRelErr added to Numeric.MathFunctions.Comparison.

  • Precision of logFactorial is slightly improved.

Changes in

  • logChoose added for calculation of logarithm of binomial coefficient

  • chooseExact and logChooseFast added

  • sinc added

Changes in

  • Fix for test suite on 32bit platform

Changes in 0.1.5

  • Numeric.Sum: new module adds accurate floating point summation.

Changes in 0.1.4

  • logFactorial type is genberalized. It accepts any Integral type

  • Evaluation of polynomials using Horner’s method where coefficients are store in lists added

Changes in 0.1.3

  • Error function and its inverse added.

  • Digamma function added

  • Evaluation of polynomials using Horner’s method added.

  • Crash bug in the inverse incomplete beta fixed.