summaryrefslogtreecommitdiff
path: root/packages/special/lib/Numeric/GSL/Special/Elementary.hs
blob: 2c092cdaea698923c27fe5db57263c8efafd8fb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{-# LANGUAGE CPP #-}
------------------------------------------------------------
-- |
-- Module      :  Numeric.GSL.Special.Elementary
-- Copyright   :  (c) Alberto Ruiz 2006-11
-- License     :  GPL
-- Maintainer  :  Alberto Ruiz (aruiz at um dot es)
-- Stability   :  provisional
-- Portability :  uses ffi
--
-- Wrappers for selected functions described at:
--
-- <http://www.google.com/search?q=gsl_sf_elementary.h&as_sitesearch=www.gnu.org/software/gsl/manual&btnI=Lucky>
------------------------------------------------------------

module Numeric.GSL.Special.Elementary(
  multiply_e
, multiply
, multiply_err_e
) where

import Foreign(Ptr)
import Foreign.C.Types
import Numeric.GSL.Special.Internal

multiply_e :: Double -> Double -> (Double,Double)
multiply_e x y = createSFR "multiply_e" $ gsl_sf_multiply_e x y
foreign import ccall SAFE_CHEAP "gsl_sf_multiply_e" gsl_sf_multiply_e :: Double -> Double -> Ptr () -> IO CInt

multiply :: Double -> Double -> Double
multiply = gsl_sf_multiply
foreign import ccall SAFE_CHEAP "gsl_sf_multiply" gsl_sf_multiply :: Double -> Double -> Double

multiply_err_e :: Double -> Double -> Double -> Double -> (Double,Double)
multiply_err_e x dx y dy = createSFR "multiply_err_e" $ gsl_sf_multiply_err_e x dx y dy
foreign import ccall SAFE_CHEAP "gsl_sf_multiply_err_e" gsl_sf_multiply_err_e :: Double -> Double -> Double -> Double -> Ptr () -> IO CInt