finite-fields-0.2: Arithmetic in finite fields
Safe HaskellSafe-Inferred
LanguageHaskell2010

Math.FiniteField.Sign

Description

Signs

Synopsis

Documentation

data Sign Source #

Constructors

Plus 
Minus 

Instances

Instances details
Eq Sign Source # 
Instance details

Defined in Math.FiniteField.Sign

Methods

(==) :: Sign -> Sign -> Bool #

(/=) :: Sign -> Sign -> Bool #

Read Sign Source # 
Instance details

Defined in Math.FiniteField.Sign

Show Sign Source # 
Instance details

Defined in Math.FiniteField.Sign

Methods

showsPrec :: Int -> Sign -> ShowS #

show :: Sign -> String #

showList :: [Sign] -> ShowS #

Semigroup Sign Source # 
Instance details

Defined in Math.FiniteField.Sign

Methods

(<>) :: Sign -> Sign -> Sign #

sconcat :: NonEmpty Sign -> Sign #

stimes :: Integral b => b -> Sign -> Sign #

Monoid Sign Source # 
Instance details

Defined in Math.FiniteField.Sign

Methods

mempty :: Sign #

mappend :: Sign -> Sign -> Sign #

mconcat :: [Sign] -> Sign #

signValue :: Num a => Sign -> a Source #

+1 or -1

signed :: Num a => Sign -> a -> a Source #

Negate the second argument if the first is Minus

paritySign :: Integral a => a -> Sign Source #

Plus if even, Minus if odd

negateIfOdd :: (Integral a, Num b) => a -> b -> b Source #

Negate the second argument if the first is odd