DiffInputFunction
✖
DiffInputFunction
is an option for Diff and related functions that specifies how the input expressions should be preprocessed.
Details

- Diff[a,b,DiffInputFunctionfunc] is equivalent to Diff[func[a],func[b]].
- The default setting DiffInputFunctionIdentity will attempt to diff the original expressions.
- In addition to any arbitrary function, DiffInputFunction can take the following special settings:
-
"InputForm" equivalent to ToString[#,InputForm]& "StandardForm" equivalent to ExpressionCell[#]& "TraditionalForm" equivalent to ExpressionCell[TraditionalForm[#]]&
Examples
open allclose allBasic Examples (4)Summary of the most common use cases
Compare the input form strings of two arbitrary expressions:

https://wolfram.com/xid/0btnylo0oexe-oo5q2g

Compare the StandardForm rendering of two expressions:

https://wolfram.com/xid/0btnylo0oexe-vlzw8p

Compare two lists, ignoring order and repetitions:

https://wolfram.com/xid/0btnylo0oexe-ynco9o

Compare two strings as if they were lists of characters:

https://wolfram.com/xid/0btnylo0oexe-4tc9a6

Properties & Relations (1)Properties of the function, and connections to other functions
Compare strings returned by GenomeData:

https://wolfram.com/xid/0btnylo0oexe-tq40do

Wolfram Research (2024), DiffInputFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/DiffInputFunction.html.
Text
Wolfram Research (2024), DiffInputFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/DiffInputFunction.html.
Wolfram Research (2024), DiffInputFunction, Wolfram Language function, https://reference.wolfram.com/language/ref/DiffInputFunction.html.
CMS
Wolfram Language. 2024. "DiffInputFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DiffInputFunction.html.
Wolfram Language. 2024. "DiffInputFunction." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/DiffInputFunction.html.
APA
Wolfram Language. (2024). DiffInputFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DiffInputFunction.html
Wolfram Language. (2024). DiffInputFunction. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DiffInputFunction.html
BibTeX
@misc{reference.wolfram_2025_diffinputfunction, author="Wolfram Research", title="{DiffInputFunction}", year="2024", howpublished="\url{https://reference.wolfram.com/language/ref/DiffInputFunction.html}", note=[Accessed: 07-July-2025
]}
BibLaTeX
@online{reference.wolfram_2025_diffinputfunction, organization={Wolfram Research}, title={DiffInputFunction}, year={2024}, url={https://reference.wolfram.com/language/ref/DiffInputFunction.html}, note=[Accessed: 07-July-2025
]}