packages feed

math-functions-0.3.4.0: math-functions.cabal

name:           math-functions
version:        0.3.4.0
cabal-version:  >= 1.10
license:        BSD2
license-file:   LICENSE
author:         Bryan O'Sullivan <bos@serpentine.com>,
                Alexey Khudyakov <alexey.skladnoy@gmail.com>
maintainer:     Alexey Khudyakov <alexey.skladnoy@gmail.com>
homepage:       https://github.com/bos/math-functions
bug-reports:    https://github.com/bos/math-functions/issues
category:       Math, Numeric
build-type:     Simple
synopsis:       Collection of tools for numeric computations
description:

  This library contain collection of various utilities for numerical
  computing. So far there're special mathematical functions,
  compensated summation algorithm, summation of series, root finding
  for real functions, polynomial summation and Chebyshev
  polynomials. 

tested-with:
    GHC ==7.4.2
     || ==7.6.3
     || ==7.8.4
     || ==7.10.3
     || ==8.0.2
     || ==8.2.2
     || ==8.4.4
     || ==8.6.5
     || ==8.8.3
     || ==8.10.1
  , GHCJS ==8.4

extra-source-files:
                   changelog.md
                   README.markdown
                   tests/Tests/SpecFunctions/gen.py
                   tests/tables/generate.py
                   tests/tables/shell.nix
                   tests/tables/*.dat
                   tests/tables/inputs/*.dat
                   doc/sinc.hs

flag system-expm1
     description: Use expm1 provided by system. For GHC newer that
                  8.0, GHCJS, and on Windows has no effect. GHC>=8.0
                  provides expm1 so it's used. On GHCJS and on Windows
                  we don't have C implementation so bundled one is
                  used instead.
     default:     True
     manual:      True

flag system-erf
     description: Use erf and erfc provided by system. On GHCJS
                  version provided by library is used regardless of
                  flag for that lack of libc.
     default:     True
     manual:      True

library
  default-language: Haskell2010
  other-extensions:
    BangPatterns
    CPP
    DeriveDataTypeable
    FlexibleContexts
    MultiParamTypeClasses
    ScopedTypeVariables
    TypeFamilies
    DeriveGeneric

  ghc-options:          -Wall -O2
  build-depends:        base                >= 4.5 && < 5
                      , deepseq
                      , data-default-class  >= 0.1.2.0
                      , vector              >= 0.7
                      , primitive
  if flag(system-expm1) && !os(windows)
    cpp-options: -DUSE_SYSTEM_EXPM1
  if flag(system-erf)   && !impl(ghcjs)
    cpp-options: -DUSE_SYSTEM_ERF
  exposed-modules:
    Numeric.MathFunctions.Constants
    Numeric.MathFunctions.Comparison
    Numeric.Polynomial
    Numeric.Polynomial.Chebyshev
    Numeric.RootFinding
    Numeric.SpecFunctions
    Numeric.SpecFunctions.Extra
    Numeric.SpecFunctions.Internal
    Numeric.Series
    Numeric.Sum
  other-modules:
    Numeric.SpecFunctions.Compat

test-suite tests
  default-language: Haskell2010
  other-extensions: ViewPatterns

  type:           exitcode-stdio-1.0
  ghc-options:    -Wall -threaded
  if arch(i386)
    -- The Sum tests require SSE2 on i686 to pass (because of excess precision)
    ghc-options:  -msse2
  hs-source-dirs: tests
  main-is:        tests.hs
  other-modules:
    Tests.Helpers
    Tests.Chebyshev
    Tests.Comparison
    Tests.RootFinding
    Tests.SpecFunctions
    Tests.SpecFunctions.Tables
    Tests.Sum
  if flag(system-erf)   && !impl(ghcjs)
    cpp-options: -DUSE_SYSTEM_ERF
  build-depends:    base >=4.5 && <5
                  , math-functions
                  , data-default-class  >= 0.1.2.0
                  , deepseq
                  , primitive
                  , vector >= 0.7
                  , vector-th-unbox
                  , erf
                  , QuickCheck       >= 2.7
                  , tasty            >= 1.2
                  , tasty-hunit      >= 0.10
                  , tasty-quickcheck >= 0.10

source-repository head
  type:     git
  location: https://github.com/bos/math-functions