SameTest

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 all

Basic Examples  (2)

Union of a set of integers:

Union considering comparison modulo 3:

Find a fixed point to a tolerance:

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:

Wolfram Research (1991), SameTest, Wolfram Language function, https://reference.wolfram.com/language/ref/SameTest.html.

Text

Wolfram Research (1991), SameTest, Wolfram Language function, https://reference.wolfram.com/language/ref/SameTest.html.

BibTeX

@misc{reference.wolfram_2021_sametest, author="Wolfram Research", title="{SameTest}", year="1991", howpublished="\url{https://reference.wolfram.com/language/ref/SameTest.html}", note=[Accessed: 25-September-2021 ]}

BibLaTeX

@online{reference.wolfram_2021_sametest, organization={Wolfram Research}, title={SameTest}, year={1991}, url={https://reference.wolfram.com/language/ref/SameTest.html}, note=[Accessed: 25-September-2021 ]}

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