numbers-2009.8.9: Various number types

Data.Number.Fixed

Description

Numbers with a fixed number of decimals.

Synopsis

Documentation

data Fixed e Source

class Epsilon e Source

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

data Eps1 Source

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

data EpsDiv10 p Source

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

data Prec10 Source

Ten decimals.

data Prec50 Source

50 decimals.

convertFixed :: (Epsilon e, Epsilon f) => Fixed e -> Fixed fSource

Convert between two arbitrary fixed precision types.

dynamicEps :: forall a. Rational -> (forall e. Epsilon e => Fixed e -> a) -> Rational -> aSource