SameAs[y]
is an operator form that yields x===y when applied to an expression x.


SameAs
SameAs[y]
is an operator form that yields x===y when applied to an expression x.
Details

- SameAs[y][x] yields True if the expression x is identical to y, and yields False otherwise.
- SameAs[y][x1,x2,…] is equivalent to SameQ[x1,x2,…,y].
- SameAs requires exact correspondence between expressions, except that it still considers Real numbers equal if they differ in their last binary digit.
- SameAs[y][] is equivalent to SameQ[y].
Examples
open all close allBasic Examples (3)
Scope (2)
Numbers in different representations are not the same:
Equal nevertheless treats them as equal:
Approximate numbers that differ in their last bit are still considered identical:
Applications (1)
Related Guides
History
Text
Wolfram Research (2022), SameAs, Wolfram Language function, https://reference.wolfram.com/language/ref/SameAs.html.
CMS
Wolfram Language. 2022. "SameAs." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/SameAs.html.
APA
Wolfram Language. (2022). SameAs. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SameAs.html
BibTeX
@misc{reference.wolfram_2025_sameas, author="Wolfram Research", title="{SameAs}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/SameAs.html}", note=[Accessed: 15-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_sameas, organization={Wolfram Research}, title={SameAs}, year={2022}, url={https://reference.wolfram.com/language/ref/SameAs.html}, note=[Accessed: 15-August-2025]}