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

Math.FiniteField.Sign

Description

Signs

Synopsis

Documentation

data Sign Source #

Constructors

Plus 
Minus 

Instances

Instances details
Monoid Sign Source # 
Instance details

Defined in Math.FiniteField.Sign

Methods

mempty :: Sign #

mappend :: Sign -> Sign -> Sign #

mconcat :: [Sign] -> Sign #

Semigroup Sign Source # 
Instance details

Defined in Math.FiniteField.Sign

Methods

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

sconcat :: NonEmpty Sign -> Sign #

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

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 #

Eq Sign Source # 
Instance details

Defined in Math.FiniteField.Sign

Methods

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

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

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