feldspar-language-0.4.0.2: A functional embedded language for DSP and parallelism

Feldspar.FixedPoint

Synopsis

Documentation

data Fix a Source

Abstract real number type with exponent and mantissa

Constructors

Fix 

Instances

Eq (Fix a) 
(Range a ~ Size a, Bounded a, Numeric a, Bits a, Ord a, Real a, Integral a) => Fractional (Fix a) 
(Range a ~ Size a, Bounded a, Numeric a, Bits a, Ord a, Real a) => Num (Fix a) 
Show (Fix a) 
Type a => EdgeInfo (Fix a) 
Type a => Syntactic (Fix a) 
(Type a, Bits a) => Splittable (Fix a) 
Bits a => Fixable (Fix a) 
Type a => MultiEdge (Fix a) Feldspar EdgeSize 

class Splittable t => Fixable t whereSource

Operations to get and set exponent

Instances

freezeFix :: Type a => Fix a -> Data (DefaultInt, a)Source

Convers an abstract real number to a pair of exponent and mantissa

freezeFix' :: Bits a => DefaultInt -> Fix a -> Data aSource

Convers an abstract real number to fixed point integer with given exponent

unfreezeFix :: Type a => Data (DefaultInt, a) -> Fix aSource

Converts a pair of exponent and mantissa to an abstract real number

unfreezeFix' :: DefaultInt -> Data a -> Fix aSource

Converts a fixed point integer with given exponent to an abstract real number

(?!) :: forall a. (Syntactic a, Splittable a) => Data Bool -> (a, a) -> aSource

A version of branching for fixed point algorithms

fixFold :: forall a b. Splittable a => (a -> b -> a) -> a -> Vector b -> aSource

A version of vector fold for fixed point algorithms