numbers-3000.2.0.2: Various number types

Safe Haskell | Safe-Inferred
Language | Haskell98

Data.Number.CReal

Synopsis

- data CReal
- showCReal :: Int -> CReal -> String

# 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

Instances details

Enum CReal Source # |
Instance details Defined in Data.Number.CReal Methods succ :: CReal -> CReal Source # pred :: CReal -> CReal Source # toEnum :: Int -> CReal Source # fromEnum :: CReal -> Int Source # enumFrom :: CReal -> [CReal] Source # enumFromThen :: CReal -> CReal -> [CReal] Source # enumFromTo :: CReal -> CReal -> [CReal] Source # enumFromThenTo :: CReal -> CReal -> CReal -> [CReal] Source #
Floating CReal Source # |

Instance details

Defined in Data.Number.CReal

Methods

pi :: CReal Source #

exp :: CReal -> CReal Source #

log :: CReal -> CReal Source #

sqrt :: CReal -> CReal Source #

(**) :: CReal -> CReal -> CReal Source #

logBase :: CReal -> CReal -> CReal Source #

sin :: CReal -> CReal Source #

cos :: CReal -> CReal Source #

tan :: CReal -> CReal Source #

asin :: CReal -> CReal Source #

acos :: CReal -> CReal Source #

atan :: CReal -> CReal Source #

sinh :: CReal -> CReal Source #

cosh :: CReal -> CReal Source #

tanh :: CReal -> CReal Source #

asinh :: CReal -> CReal Source #

acosh :: CReal -> CReal Source #

atanh :: CReal -> CReal Source #

log1p :: CReal -> CReal Source #

expm1 :: CReal -> CReal Source #

log1pexp :: CReal -> CReal Source #

log1mexp :: CReal -> CReal Source #

RealFloat CReal Source # |

Instance details

Defined in Data.Number.CReal

Methods

floatRadix :: CReal -> Integer Source #

floatDigits :: CReal -> Int Source #

floatRange :: CReal -> (Int, Int) Source #

decodeFloat :: CReal -> (Integer, Int) Source #

encodeFloat :: Integer -> Int -> CReal Source #

exponent :: CReal -> Int Source #

significand :: CReal -> CReal Source #

scaleFloat :: Int -> CReal -> CReal Source #

isNaN :: CReal -> Bool Source #

isInfinite :: CReal -> Bool Source #

isDenormalized :: CReal -> Bool Source #

isNegativeZero :: CReal -> Bool Source #

isIEEE :: CReal -> Bool Source #

atan2 :: CReal -> CReal -> CReal Source #

Num CReal Source # |
Instance details Defined in Data.Number.CReal Methods (+) :: CReal -> CReal -> CReal Source # (-) :: CReal -> CReal -> CReal Source # (*) :: CReal -> CReal -> CReal Source # negate :: CReal -> CReal Source # abs :: CReal -> CReal Source # signum :: CReal -> CReal Source # fromInteger :: Integer -> CReal Source #
Read CReal Source # |
Instance details Defined in Data.Number.CReal Methods readsPrec :: Int -> ReadS CReal Source # readList :: ReadS [CReal] Source # readPrec :: ReadPrec CReal Source # readListPrec :: ReadPrec [CReal] Source #
Fractional CReal Source # |
Instance details Defined in Data.Number.CReal Methods (/) :: CReal -> CReal -> CReal Source # recip :: CReal -> CReal Source # fromRational :: Rational -> CReal Source #
Real CReal Source # |
Instance details Defined in Data.Number.CReal Methods toRational :: CReal -> Rational Source #
RealFrac CReal Source # |
Instance details Defined in Data.Number.CReal Methods properFraction :: Integral b => CReal -> (b, CReal) Source # truncate :: Integral b => CReal -> b Source # round :: Integral b => CReal -> b Source # ceiling :: Integral b => CReal -> b Source # floor :: Integral b => CReal -> b Source #
Show CReal Source # |
Instance details Defined in Data.Number.CReal Methods showsPrec :: Int -> CReal -> ShowS Source # show :: CReal -> String Source # showList :: [CReal] -> ShowS Source #
Eq CReal Source # |
Instance details Defined in Data.Number.CReal Methods (==) :: CReal -> CReal -> Bool Source # (/=) :: CReal -> CReal -> Bool Source #
Ord CReal Source # |
Instance details Defined in Data.Number.CReal Methods compare :: CReal -> CReal -> Ordering Source # (<) :: CReal -> CReal -> Bool Source # (<=) :: CReal -> CReal -> Bool Source # (>) :: CReal -> CReal -> Bool Source # (>=) :: CReal -> CReal -> Bool Source # max :: CReal -> CReal -> CReal Source # min :: CReal -> CReal -> CReal Source #

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`.