Support for unified handling of scalars and vectors.
The rounding and fraction functions only work
for floating point values with maximum magnitude of
maxBound :: Int32.
This way we save expensive handling of possibly seldom cases.
- class (Real a, IsFloating a) => Fraction a where
- signedFraction :: Fraction a => Value a -> CodeGenFunction r (Value a)
- addToPhase :: Fraction a => Value a -> Value a -> CodeGenFunction r (Value a)
- incPhase :: Fraction a => Value a -> Value a -> CodeGenFunction r (Value a)
- class Replicate scalar vector | vector -> scalar where
- replicateOf :: (IsConst a, Replicate a v) => a -> Value v
- class IsArithmetic a => Real a where
- class (Replicate a v, IsArithmetic a, IsArithmetic v) => PseudoModule a v where
- class IsConst a => IntegerConstant a where
- class IntegerConstant a => RationalConstant a where
The fraction has the same sign as the argument. This is not particular useful but fast on IEEE implementations.
increment (first operand) may be negative, phase must always be non-negative
both increment and phase must be non-negative