| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Haskus.Format.Binary.FixedPoint
Description
Fixed-point numbers
- data FixedPoint w i f
- toFixedPoint :: forall a w n d. (RealFrac a, BitSize w ~ (n + d), KnownNat n, KnownNat d, Bits w, Field w, Num w, Integral w) => a -> FixedPoint w n d
- fromFixedPoint :: forall a w n d. (RealFrac a, BitSize w ~ (n + d), KnownNat n, KnownNat d, Bits w, Field w, Num w, Integral w) => FixedPoint w n d -> a
Documentation
data FixedPoint w i f Source #
Fixed-point number
w is the backing type
i is the number of bits for the integer part (before the readix point)
f is the number of bits for the fractional part (after the radix point)
Instances