hypergeometric 0.1.2.0 → 0.1.3.0
raw patch · 3 files changed
+17/−3 lines, 3 files
Files
- CHANGELOG.md +4/−0
- hypergeometric.cabal +2/−2
- src/Math/SpecialFunction.hs +11/−1
CHANGELOG.md view
@@ -1,5 +1,9 @@ # hypergeometric +## 0.1.3.0++ * Add `bessel1`+ ## 0.1.2.0 * Add `tcdf`, `chisqcdf`, `fcdf`
hypergeometric.cabal view
@@ -1,6 +1,6 @@ cabal-version: 1.18 name: hypergeometric-version: 0.1.2.0+version: 0.1.3.0 license: AGPL-3 license-file: COPYING copyright: Copyright: (c) 2022 Vanessa McHale@@ -24,8 +24,8 @@ library exposed-modules:- Math.Hypergeometric Math.SpecialFunction+ Math.Hypergeometric hs-source-dirs: src default-language: Haskell2010
src/Math/SpecialFunction.hs view
@@ -1,5 +1,6 @@ module Math.SpecialFunction ( incbeta , beta+ , bessel1 , gamma , gammaln , fcdf@@ -19,6 +20,15 @@ -> a tcdf 𝜈 x = 0.5 + x * gamma (0.5*(𝜈+1)) / (sqrt(pi*𝜈) * gamma(𝜈/2)) * hypergeometric [0.5, 0.5*(𝜈+1)] [1.5] (-x^(2::Int)/𝜈) +-- | Bessel functions of the first kind, \( J_\alpha(x)\).+--+-- @since 0.1.3.0+bessel1 :: (Floating a, Ord a)+ => a -- ^ \(\alpha\)+ -> a -- ^ \(x\)+ -> a+bessel1 𝛼 x = ((x/2)**𝛼/gamma(𝛼+1))*hypergeometric [] [𝛼+1] (-(x^(2::Int))/4)+ -- | @since 0.1.2.0 {-# SPECIALIZE chisqcdf :: Double -> Double -> Double #-} chisqcdf :: (Floating a, Ord a)@@ -34,7 +44,7 @@ -- TODO: writeup? -- -- chisqcdf 10 28 works better this way than w/ e^-x ... x---+ -- (1 2 H. _1.1) 1 hangs indefinitely {-# SPECIALIZE incbeta :: Double -> Double -> Double -> Double #-}