HGeometry.Sign
Description
Signs of expressions
data Sign Source #
The sign of an expression
Constructors
Defined in HGeometry.Sign
Methods
minBound :: Sign #
maxBound :: Sign #
succ :: Sign -> Sign #
pred :: Sign -> Sign #
toEnum :: Int -> Sign #
fromEnum :: Sign -> Int #
enumFrom :: Sign -> [Sign] #
enumFromThen :: Sign -> Sign -> [Sign] #
enumFromTo :: Sign -> Sign -> [Sign] #
enumFromThenTo :: Sign -> Sign -> Sign -> [Sign] #
showsPrec :: Int -> Sign -> ShowS #
show :: Sign -> String #
showList :: [Sign] -> ShowS #
(==) :: Sign -> Sign -> Bool #
(/=) :: Sign -> Sign -> Bool #
compare :: Sign -> Sign -> Ordering #
(<) :: Sign -> Sign -> Bool #
(<=) :: Sign -> Sign -> Bool #
(>) :: Sign -> Sign -> Bool #
(>=) :: Sign -> Sign -> Bool #
max :: Sign -> Sign -> Sign #
min :: Sign -> Sign -> Sign #
flipSign :: Sign -> Sign Source #
Flip Positive = Negative.
signFromTerms :: (Num r, Eq r, Foldable1 f) => f r -> Maybe Sign Source #
Given the terms, in decreasing order of significance, computes the sign
i.e. expects a list of terms, we base the sign on the sign of the first non-zero term.