hmatrix-special-0.3.0.1: Interface to GSL special functions

Copyright(c) Alberto Ruiz 2006
LicenseGPL-style
MaintainerAlberto Ruiz (aruiz at um dot es)
Stabilityprovisional
Portabilityuses ffi
Safe HaskellNone
LanguageHaskell98

Numeric.GSL.Special

Contents

Description

Synopsis

Functions

Util

mkComplex_e :: (Double -> Double -> ((Double, Double), (Double, Double))) -> Complex Double -> (Complex Double, Complex Double) Source

Some GSL complex functions work with separate real and imaginary parts stored in real variables, obtaining tuples (value, error) for the real and imaginary parts of the result:

> import Numeric.GSL.Special.Dilog
> complex_dilog_xy_e 1 1
((0.6168502750680847,1.1097853812294034e-14),(1.4603621167531193,1.1855504863267322e-14))

We can use mkComplex_e to work with "normal" complex numbers:

> import Numeric.GSL.Special(mkComplex_e)
> import Data.Complex
> let dilogC = fst . mkComplex_e complex_dilog_xy_e
> dilogC (1 :+ 1)
0.6168502750680847 :+ 1.4603621167531193