diff options
author | Alberto Ruiz <aruiz@um.es> | 2007-11-12 12:24:12 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2007-11-12 12:24:12 +0000 |
commit | 25d7892ac78f0f1a4fda538dd35430ebff02baaa (patch) | |
tree | 170572a869a5d73cd09bdf39b17fbb37b6e451fd /lib/Numeric/GSL/Polynomials.hs | |
parent | 33a9909d0d59f468039597c405306b8d5fa9e008 (diff) |
withMatrix
Diffstat (limited to 'lib/Numeric/GSL/Polynomials.hs')
-rw-r--r-- | lib/Numeric/GSL/Polynomials.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Numeric/GSL/Polynomials.hs b/lib/Numeric/GSL/Polynomials.hs index 42694f0..e663711 100644 --- a/lib/Numeric/GSL/Polynomials.hs +++ b/lib/Numeric/GSL/Polynomials.hs | |||
@@ -47,7 +47,8 @@ polySolve = toList . polySolve' . fromList | |||
47 | polySolve' :: Vector Double -> Vector (Complex Double) | 47 | polySolve' :: Vector Double -> Vector (Complex Double) |
48 | polySolve' v | dim v > 1 = unsafePerformIO $ do | 48 | polySolve' v | dim v > 1 = unsafePerformIO $ do |
49 | r <- createVector (dim v-1) | 49 | r <- createVector (dim v-1) |
50 | c_polySolve // vec v // vec r // check "polySolve" [v] | 50 | ww2 withVector v withVector r $ \ v r -> |
51 | c_polySolve // v // r // check "polySolve" | ||
51 | return r | 52 | return r |
52 | | otherwise = error "polySolve on a polynomial of degree zero" | 53 | | otherwise = error "polySolve on a polynomial of degree zero" |
53 | 54 | ||