Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Synopsis
- type Uni = Fixed E0
- f00int :: Cast k Uni Integer
- type Deci = Fixed E1
- f01f00 :: Cast k Deci Uni
- type Centi = Fixed E2
- f02f00 :: Cast k Centi Uni
- f02f01 :: Cast k Centi Deci
- type Milli = Fixed E3
- f03f00 :: Cast k Milli Uni
- f03f01 :: Cast k Milli Deci
- f03f02 :: Cast k Milli Centi
- type Micro = Fixed E6
- f06f00 :: Cast k Micro Uni
- f06f01 :: Cast k Micro Deci
- f06f02 :: Cast k Micro Centi
- f06f03 :: Cast k Micro Milli
- type Nano = Fixed E9
- f09f00 :: Cast k Nano Uni
- f09f01 :: Cast k Nano Deci
- f09f02 :: Cast k Nano Centi
- f09f03 :: Cast k Nano Milli
- f09f06 :: Cast k Nano Micro
- type Pico = Fixed E12
- f12f00 :: Cast k Pico Uni
- f12f01 :: Cast k Pico Deci
- f12f02 :: Cast k Pico Centi
- f12f03 :: Cast k Pico Milli
- f12f06 :: Cast k Pico Micro
- f12f09 :: Cast k Pico Nano
- f32fix :: HasResolution e => Cast L Float (Extended (Fixed e))
- f64fix :: HasResolution e => Cast L Double (Extended (Fixed e))
- ratfix :: forall e k. HasResolution e => Cast k Rational (Extended (Fixed e))
- shiftf :: Integer -> Fixed a -> Fixed a
- showFixed :: HasResolution a => Bool -> Fixed a -> String
- newtype Fixed a = MkFixed Integer
- class HasResolution a where
- resolution :: p a -> Integer
Uni
Deci
Centi
Milli
Micro
Nano
Pico
Fixed
shiftf :: Integer -> Fixed a -> Fixed a Source #
Shift by n 'units of least precision' where the ULP is determined by the precision.
This is an analog of shift32
for fixed point numbers.
showFixed :: HasResolution a => Bool -> Fixed a -> String #
First arg is whether to chop off trailing zeros
The type parameter should be an instance of HasResolution
.
Instances
class HasResolution a where #
resolution :: p a -> Integer #
Instances
HasResolution E0 | Since: base-4.1.0.0 |
Defined in Data.Fixed resolution :: p E0 -> Integer # | |
HasResolution E1 | Since: base-4.1.0.0 |
Defined in Data.Fixed resolution :: p E1 -> Integer # | |
HasResolution E2 | Since: base-4.1.0.0 |
Defined in Data.Fixed resolution :: p E2 -> Integer # | |
HasResolution E3 | Since: base-4.1.0.0 |
Defined in Data.Fixed resolution :: p E3 -> Integer # | |
HasResolution E6 | Since: base-2.1 |
Defined in Data.Fixed resolution :: p E6 -> Integer # | |
HasResolution E9 | Since: base-4.1.0.0 |
Defined in Data.Fixed resolution :: p E9 -> Integer # | |
HasResolution E12 | Since: base-2.1 |
Defined in Data.Fixed resolution :: p E12 -> Integer # |