summaryrefslogtreecommitdiff
path: root/packages/hmatrix/src/Numeric/GSL/Polynomials.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2014-05-08 13:43:07 +0200
committerAlberto Ruiz <aruiz@um.es>2014-05-08 13:43:07 +0200
commit551cf7498c33bc0948bb4cb8444ae6f8af7278ea (patch)
treeec86ff73151746f5e13b83549ea5c60ed442764d /packages/hmatrix/src/Numeric/GSL/Polynomials.hs
parent561a6c0e21bb77c21114ccbbd86d3af5ddb5a3f1 (diff)
separation ok
Diffstat (limited to 'packages/hmatrix/src/Numeric/GSL/Polynomials.hs')
-rw-r--r--packages/hmatrix/src/Numeric/GSL/Polynomials.hs17
1 files changed, 8 insertions, 9 deletions
diff --git a/packages/hmatrix/src/Numeric/GSL/Polynomials.hs b/packages/hmatrix/src/Numeric/GSL/Polynomials.hs
index 290c615..b1be85d 100644
--- a/packages/hmatrix/src/Numeric/GSL/Polynomials.hs
+++ b/packages/hmatrix/src/Numeric/GSL/Polynomials.hs
@@ -1,25 +1,23 @@
1{-# LANGUAGE CPP, ForeignFunctionInterface #-}
2-----------------------------------------------------------------------------
3{- | 1{- |
4Module : Numeric.GSL.Polynomials 2Module : Numeric.GSL.Polynomials
5Copyright : (c) Alberto Ruiz 2006 3Copyright : (c) Alberto Ruiz 2006
6License : GPL-style 4License : GPL
7 5Maintainer : Alberto Ruiz
8Maintainer : Alberto Ruiz (aruiz at um dot es)
9Stability : provisional 6Stability : provisional
10Portability : uses ffi
11 7
12Polynomials. 8Polynomials.
13 9
14<http://www.gnu.org/software/gsl/manual/html_node/General-Polynomial-Equations.html#General-Polynomial-Equations> 10<http://www.gnu.org/software/gsl/manual/html_node/General-Polynomial-Equations.html#General-Polynomial-Equations>
15 11
16-} 12-}
17----------------------------------------------------------------------------- 13
14
18module Numeric.GSL.Polynomials ( 15module Numeric.GSL.Polynomials (
19 polySolve 16 polySolve
20) where 17) where
21 18
22import Data.Packed.Internal 19import Data.Packed
20import Numeric.GSL.Internal
23import Data.Complex 21import Data.Complex
24import System.IO.Unsafe (unsafePerformIO) 22import System.IO.Unsafe (unsafePerformIO)
25 23
@@ -55,4 +53,5 @@ polySolve' v | dim v > 1 = unsafePerformIO $ do
55 return r 53 return r
56 | otherwise = error "polySolve on a polynomial of degree zero" 54 | otherwise = error "polySolve on a polynomial of degree zero"
57 55
58foreign import ccall unsafe "gsl-aux.h polySolve" c_polySolve:: TVCV 56foreign import ccall unsafe "gsl-aux.h polySolve" c_polySolve:: TV (TCV Res)
57