numbers-3000.2.0.2: Various number types

Safe Haskell | None
Language | Haskell98

Data.Number.BigFloat

Description

A simple implementation of floating point numbers with a selectable precision. The number of digits in the mantissa is selected by the `Epsilon` type class from the Fixed module.

The numbers are stored in base 10.

Synopsis

- data BigFloat e
- class Epsilon e
- data Eps1
- data EpsDiv10 p
- data Prec10
- data Prec50
- data PrecPlus20 e

# Documentation

data BigFloat e Source #

Floating point number where the precision is determined by the type e.

#### Instances

Instances details

Epsilon e => Floating (BigFloat e) Source # |

Instance details

Defined in Data.Number.BigFloat

Methods

pi :: BigFloat e Source #

exp :: BigFloat e -> BigFloat e Source #

log :: BigFloat e -> BigFloat e Source #

sqrt :: BigFloat e -> BigFloat e Source #

(**) :: BigFloat e -> BigFloat e -> BigFloat e Source #

logBase :: BigFloat e -> BigFloat e -> BigFloat e Source #

sin :: BigFloat e -> BigFloat e Source #

cos :: BigFloat e -> BigFloat e Source #

tan :: BigFloat e -> BigFloat e Source #

asin :: BigFloat e -> BigFloat e Source #

acos :: BigFloat e -> BigFloat e Source #

atan :: BigFloat e -> BigFloat e Source #

sinh :: BigFloat e -> BigFloat e Source #

cosh :: BigFloat e -> BigFloat e Source #

tanh :: BigFloat e -> BigFloat e Source #

asinh :: BigFloat e -> BigFloat e Source #

acosh :: BigFloat e -> BigFloat e Source #

atanh :: BigFloat e -> BigFloat e Source #

log1p :: BigFloat e -> BigFloat e Source #

expm1 :: BigFloat e -> BigFloat e Source #

log1pexp :: BigFloat e -> BigFloat e Source #

log1mexp :: BigFloat e -> BigFloat e Source #

Epsilon e => RealFloat (BigFloat e) Source # |

Instance details

Defined in Data.Number.BigFloat

Methods

floatRadix :: BigFloat e -> Integer Source #

floatDigits :: BigFloat e -> Int Source #

floatRange :: BigFloat e -> (Int, Int) Source #

decodeFloat :: BigFloat e -> (Integer, Int) Source #

encodeFloat :: Integer -> Int -> BigFloat e Source #

exponent :: BigFloat e -> Int Source #

significand :: BigFloat e -> BigFloat e Source #

scaleFloat :: Int -> BigFloat e -> BigFloat e Source #

isNaN :: BigFloat e -> Bool Source #

isInfinite :: BigFloat e -> Bool Source #

isDenormalized :: BigFloat e -> Bool Source #

isNegativeZero :: BigFloat e -> Bool Source #

isIEEE :: BigFloat e -> Bool Source #

atan2 :: BigFloat e -> BigFloat e -> BigFloat e Source #

Epsilon e => Num (BigFloat e) Source # |
Instance details Defined in Data.Number.BigFloat Methods (+) :: BigFloat e -> BigFloat e -> BigFloat e Source # (-) :: BigFloat e -> BigFloat e -> BigFloat e Source # (*) :: BigFloat e -> BigFloat e -> BigFloat e Source # negate :: BigFloat e -> BigFloat e Source # abs :: BigFloat e -> BigFloat e Source # signum :: BigFloat e -> BigFloat e Source # fromInteger :: Integer -> BigFloat e Source #
Epsilon e => Fractional (BigFloat e) Source # |
Instance details Defined in Data.Number.BigFloat Methods (/) :: BigFloat e -> BigFloat e -> BigFloat e Source # recip :: BigFloat e -> BigFloat e Source # fromRational :: Rational -> BigFloat e Source #
Epsilon e => Real (BigFloat e) Source # |
Instance details Defined in Data.Number.BigFloat Methods toRational :: BigFloat e -> Rational Source #
Epsilon e => RealFrac (BigFloat e) Source # |
Instance details Defined in Data.Number.BigFloat Methods properFraction :: Integral b => BigFloat e -> (b, BigFloat e) Source # truncate :: Integral b => BigFloat e -> b Source # round :: Integral b => BigFloat e -> b Source # ceiling :: Integral b => BigFloat e -> b Source # floor :: Integral b => BigFloat e -> b Source #
Epsilon e => Show (BigFloat e) Source # |
Instance details Defined in Data.Number.BigFloat Methods showsPrec :: Int -> BigFloat e -> ShowS Source # show :: BigFloat e -> String Source # showList :: [BigFloat e] -> ShowS Source #
Eq (BigFloat e) Source # |
Instance details Defined in Data.Number.BigFloat Methods (==) :: BigFloat e -> BigFloat e -> Bool Source # (/=) :: BigFloat e -> BigFloat e -> Bool Source #
Epsilon e => Ord (BigFloat e) Source # |

Instance details

Defined in Data.Number.BigFloat

Methods

compare :: BigFloat e -> BigFloat e -> Ordering Source #

(<) :: BigFloat e -> BigFloat e -> Bool Source #

(<=) :: BigFloat e -> BigFloat e -> Bool Source #

(>) :: BigFloat e -> BigFloat e -> Bool Source #

(>=) :: BigFloat e -> BigFloat e -> Bool Source #

max :: BigFloat e -> BigFloat e -> BigFloat e Source #

min :: BigFloat e -> BigFloat e -> BigFloat e Source #

class Epsilon e Source #

The `Epsilon` class contains the types that can be used to determine the precision of a `Fixed` number.

Minimal complete definition

eps

#### Instances

Instances details

Epsilon Eps1 Source # |
Instance details Defined in Data.Number.Fixed Methods eps :: Eps1 -> Rational
Epsilon Prec10 Source # |
Instance details Defined in Data.Number.Fixed Methods eps :: Prec10 -> Rational
Epsilon Prec50 Source # |
Instance details Defined in Data.Number.Fixed Methods eps :: Prec50 -> Rational
Epsilon Prec500 Source # |
Instance details Defined in Data.Number.Fixed Methods eps :: Prec500 -> Rational
Epsilon e => Epsilon (EpsDiv10 e) Source # |
Instance details Defined in Data.Number.Fixed Methods eps :: EpsDiv10 e -> Rational
Epsilon e => Epsilon (PrecPlus20 e) Source # |
Instance details Defined in Data.Number.Fixed Methods eps :: PrecPlus20 e -> Rational

data Eps1 Source #

An epsilon of 1, i.e., no decimals.

#### Instances

Instances details

Epsilon Eps1 Source # |
Instance details Defined in Data.Number.Fixed Methods eps :: Eps1 -> Rational

data EpsDiv10 p Source #

A type construct that gives one more decimals than the argument.

#### Instances

Instances details

Epsilon e => Epsilon (EpsDiv10 e) Source # |
Instance details Defined in Data.Number.Fixed Methods eps :: EpsDiv10 e -> Rational

data Prec10 Source #

Ten decimals.

#### Instances

Instances details

Epsilon Prec10 Source # |
Instance details Defined in Data.Number.Fixed Methods eps :: Prec10 -> Rational

data Prec50 Source #

50 decimals.

#### Instances

Instances details

Epsilon Prec50 Source # |
Instance details Defined in Data.Number.Fixed Methods eps :: Prec50 -> Rational

data PrecPlus20 e Source #

#### Instances

Instances details

Epsilon e => Epsilon (PrecPlus20 e) Source # |
Instance details Defined in Data.Number.Fixed Methods eps :: PrecPlus20 e -> Rational