File: error.hs

package info (click to toggle)
haskell-hmatrix 0.15.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 608 kB
  • ctags: 302
  • sloc: haskell: 4,909; ansic: 2,688; makefile: 3
file content (21 lines) | stat: -rw-r--r-- 485 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import Numeric.GSL
import Numeric.GSL.Special
import Numeric.LinearAlgebra
import Prelude hiding (catch)
import Control.Exception

test x = catch
       (print x)
       (\e -> putStrLn $ "captured ["++ show (e :: SomeException) ++"]")

main = do
    setErrorHandlerOff

    test $ log_e (-1)
    test $ 5 + (fst.exp_e) 1000
    test $ bessel_zero_Jnu_e (-0.3) 2

    test $ (linearSolve 0 4 :: Matrix Double)
    test $ (linearSolve 5 (sqrt (-1)) :: Matrix Double)

    putStrLn "Bye"