Mathematica: Logic & Tests

Favorite Article   

Equality & Inequality:
  • Equal(==), Unequal(!=) -- numerical equality
  • SameQ(===), UnsameQ(=!=) -- literal symbolic identity
  • Less(<)
  • Greater(>)
  • LessEqual(<=)
  • GreaterEqual(>=)
  • Between

 

Logical Combinations:
  • And(&&)
  • Or(I I)
  • Not(!)
  • True
  • False...
  • AllTrue
  • AnyTrue
  • NoneTrue
     
Operator Forms:
  • GreaterThan
  • LessThan
  • GreaterEqualThan
  • LessEqualThan
  • EqualTo
  • UnequalTo
     
Numerical Properties:
  • NumberQ, MachineNumberQ -- literal number, literal machine-percision number
  • NumericQ -- numeric quantity (consisting of numbers, numeric constants, and function)
  • IntegerQ
  • EvenQ
  • OddQ
  • PrimeQ
  • CoprimeQ
  • AlgebraicIntegerQ...
  • Positive
  • Negative
  • NonPostitive
  • NonNegative
  • PossibleZeroQ
     
List-Oriented Tests:
  • VectorQ, MatrixQ -- vector, matrix, perhaps with elements of specified types
  • ArrayQ -- full array of any depth
  • MemberQ -- test whether a pattern occurs in a list
  • DuplicateFreeQ
  • IntersectingQ
  • DisjointQ
  • SubsetQ
  • ConstainsAll
  • ContainsNone
  • ContainsAny
  • ContainsOnly
  • ContainsExactly
     
Expression Tests:
  • MatchQ -- test whether an expression matches a pattern
  • AtomQ
  • ListQ
  • TrueQ
  • BooleanQ
  • OrderedQ
  • PolynomialQ
  • DateObjectQ
  • TimeObjectQ
  • Order -- canonical ordering of expressions
     
String Tests:
  • StringQ
  • StringMatchQ
  • StringFreeQ
  • LetterQ
  • DigitQ
  • SyntaxQ...

 

Referenced from: Mathematica

19586
1/4/2018 4:49:40 PM