SameTest
is an option whose setting gives a pairwise comparison function to determine whether expressions should be considered the same.
Details
- SameTest->f specifies that f[e1,e2] should be evaluated whenever it is necessary to determine whether pairs of expressions e1, e2 should be considered the same.
Examples
open allclose allBasic Examples (2)
Scope (5)
Union of a set of machine-precision numbers:
Union treating roundoff errors of order 10-12 as zeros:
Alternately, use Chop:
Intersection of two sets of integers:
Intersection considering comparison modulo 3:
This matrix is antihermitian for a positive real , but AntihermitianMatrixQ gives False:
Use the option SameTest:
This matrix is symmetric for a positive real , but SymmetricMatrixQ gives False:
Use the option SameTest:
This matrix is unitary for a positive real , but UnitaryMatrixQ gives False:
Use the option SameTest:
Text
Wolfram Research (1991), SameTest, Wolfram Language function, https://reference.wolfram.com/language/ref/SameTest.html.
CMS
Wolfram Language. 1991. "SameTest." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SameTest.html.
APA
Wolfram Language. (1991). SameTest. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SameTest.html