summaryrefslogtreecommitdiff
path: root/packages/hmatrix/examples/error.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2014-05-08 08:48:12 +0200
committerAlberto Ruiz <aruiz@um.es>2014-05-08 08:48:12 +0200
commit1925c123d7d8184a1d2ddc0a413e0fd2776e1083 (patch)
treefad79f909d9c3be53d68e6ebd67202650536d387 /packages/hmatrix/examples/error.hs
parenteb3f702d065a4a967bb754977233e6eec408fd1f (diff)
empty hmatrix-base
Diffstat (limited to 'packages/hmatrix/examples/error.hs')
-rw-r--r--packages/hmatrix/examples/error.hs21
1 files changed, 21 insertions, 0 deletions
diff --git a/packages/hmatrix/examples/error.hs b/packages/hmatrix/examples/error.hs
new file mode 100644
index 0000000..5efae7c
--- /dev/null
+++ b/packages/hmatrix/examples/error.hs
@@ -0,0 +1,21 @@
1import Numeric.GSL
2import Numeric.GSL.Special
3import Numeric.LinearAlgebra
4import Prelude hiding (catch)
5import Control.Exception
6
7test x = catch
8 (print x)
9 (\e -> putStrLn $ "captured ["++ show (e :: SomeException) ++"]")
10
11main = do
12 setErrorHandlerOff
13
14 test $ log_e (-1)
15 test $ 5 + (fst.exp_e) 1000
16 test $ bessel_zero_Jnu_e (-0.3) 2
17
18 test $ (linearSolve 0 4 :: Matrix Double)
19 test $ (linearSolve 5 (sqrt (-1)) :: Matrix Double)
20
21 putStrLn "Bye" \ No newline at end of file