numbers-3000.2.0.2: Various number types

Safe HaskellSafe
LanguageHaskell98

Data.Number.CReal

Synopsis

Documentation

data CReal Source #

The CReal type implements (constructive) real numbers.

Note that the comparison operations on CReal may diverge since it is (by necessity) impossible to implementent them correctly and always terminating.

This implementation is really David Lester's ERA package.

Instances

Enum CReal Source # 
Eq CReal Source # 

Methods

(==) :: CReal -> CReal -> Bool #

(/=) :: CReal -> CReal -> Bool #

Floating CReal Source # 
Fractional CReal Source # 
Num CReal Source # 
Ord CReal Source # 

Methods

compare :: CReal -> CReal -> Ordering #

(<) :: CReal -> CReal -> Bool #

(<=) :: CReal -> CReal -> Bool #

(>) :: CReal -> CReal -> Bool #

(>=) :: CReal -> CReal -> Bool #

max :: CReal -> CReal -> CReal #

min :: CReal -> CReal -> CReal #

Read CReal Source # 
Real CReal Source # 

Methods

toRational :: CReal -> Rational #

RealFloat CReal Source # 
RealFrac CReal Source # 

Methods

properFraction :: Integral b => CReal -> (b, CReal) #

truncate :: Integral b => CReal -> b #

round :: Integral b => CReal -> b #

ceiling :: Integral b => CReal -> b #

floor :: Integral b => CReal -> b #

Show CReal Source # 

Methods

showsPrec :: Int -> CReal -> ShowS #

show :: CReal -> String #

showList :: [CReal] -> ShowS #

showCReal Source #

Arguments

:: Int

The number of decimals

-> CReal

The real number

-> String

The resulting string

The showCReal function connverts a CReal to a String.