{-# 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 
  {
    BoundsCEDU a -> a
ceduCentre :: a
  , BoundsCEDU a -> a
ceduErr :: a
  , BoundsCEDU a -> a
ceduDown :: a
  , BoundsCEDU a -> a
ceduUp :: a
  }

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

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