packages feed

aern2-mp-0.1.4: src/AERN2/MP/Float/Auxi.hs

{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-|
    Module      :  AERN2.MP.Float.Auxi
    Description :  Auxiliary structures
    Copyright   :  (c) Michal Konecny
    License     :  BSD3

    Maintainer  :  mikkonecny@gmail.com
    Stability   :  experimental
    Portability :  portable

    Auxiliary structures for bounds on result and printing.
-}
module AERN2.MP.Float.Auxi
(
    BoundsCEDU(..)
    , ceduDownUp
    , ceduCentreErr
)
where

data BoundsCEDU a =
  BoundsCEDU 
  {
    ceduCentre :: a
  , ceduErr :: a
  , ceduDown :: a
  , ceduUp :: a
  }

ceduDownUp :: BoundsCEDU a -> (a,a)
ceduDownUp cedu = (ceduDown cedu, ceduUp cedu)

ceduCentreErr :: BoundsCEDU a -> (a,a)
ceduCentreErr cedu = (ceduCentre cedu, ceduErr cedu)