Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Signs
Synopsis
- data Sign
- isPlus :: Sign -> Bool
- isMinus :: Sign -> Bool
- signValue :: Num a => Sign -> a
- signed :: Num a => Sign -> a -> a
- paritySign :: Integral a => a -> Sign
- paritySignValue :: Integral a => a -> Integer
- negateIfOdd :: (Integral a, Num b) => a -> b -> b
- oppositeSign :: Sign -> Sign
- mulSign :: Sign -> Sign -> Sign
- productOfSigns :: [Sign] -> Sign
Documentation
paritySignValue :: Integral a => a -> Integer Source #
(-1)^k
negateIfOdd :: (Integral a, Num b) => a -> b -> b Source #
Negate the second argument if the first is odd
oppositeSign :: Sign -> Sign Source #
productOfSigns :: [Sign] -> Sign Source #