Wolfram Language Paclet Repository

Community-contributed installable additions to the Wolfram Language

Primary Navigation

    • Cloud & Deployment
    • Core Language & Structure
    • Data Manipulation & Analysis
    • Engineering Data & Computation
    • External Interfaces & Connections
    • Financial Data & Computation
    • Geographic Data & Computation
    • Geometry
    • Graphs & Networks
    • Higher Mathematical Computation
    • Images
    • Knowledge Representation & Natural Language
    • Machine Learning
    • Notebook Documents & Presentation
    • Scientific and Medical Data & Computation
    • Social, Cultural & Linguistic Data
    • Strings & Text
    • Symbolic & Numeric Computation
    • System Operation & Setup
    • Time-Related Computation
    • User Interface Construction
    • Visualization & Graphics
    • Random Paclet
    • Alphabetical List
  • Using Paclets
    • Get Started
    • Download Definition Notebook
  • Learn More about Wolfram Language

DiffTools

Guides

  • Diff Tools

Tech Notes

  • Comparing Notebooks
  • Introduction to DiffTools

Symbols

  • AlignCellLists
  • BaseDiffStyle
  • Diff3
  • DiffApply
  • DiffGranularity
  • DiffInputFunction
  • DiffInvert
  • Diff
  • DiffObject
  • DiffView
  • IgnoreElements
  • IncludeMatches
  • MoreMatches
[
EXPERIMENTAL
]
Wolfram`DiffTools`
DiffInputFunction
​
DiffInputFunction
is an option for
Diff
and related functions that specifies how the input expressions should be preprocessed.
​
Details and Options

Examples  
(4)
Basic Examples  
(4)
Compare the input form strings of two arbitrary expressions:
In[1]:=
Diff
Expand[(x+y)^5],Expand[(x-y)^5],
DiffInputFunction
"InputForm"
Out[1]=
Wolfram`DiffTools`DiffObjectViewer[1,Wolfram`DiffTools`DiffObject[1,Characters,Changes{{{1,1}x^5 },{5+,5-},{{6,6} 5*x^4*y + 10*x^3*y^2 },{28+,28-},{{29,29} 10*x^2*y^3 + 5*x*y^4 },{51+,51-},{{52,52} y^5}},View{}],
Combined
]
​
Compare the StandardForm rendering of two expressions:
In[1]:=
Diff

1
1-
3
x
x,
2
1-
3
x
x,
DiffInputFunction
"StandardForm"
Out[1]=
Wolfram`DiffTools`DiffObjectViewer[1,Wolfram`DiffTools`DiffObject[1,Cells,ContentTypes{BoxData[RowBox[#1]]&,BoxData[RowBox[#1]]&},Changes{{0{},1{-,2, ,(,-}},{{1,6}{FractionBox[RowBox[{ArcTan,[,FractionBox[RowBox[{1,+,2, ,x}],SqrtBox[3]],]}],SqrtBox[3]]}},{2{-},7{+}},{{3,8}{FractionBox[1,3], ,Log,[,1,-,x,]}},{11{+},16{-}},{{12,17}{FractionBox[1,6], ,Log,[,1,+,x,+,SuperscriptBox[x,2],]}},{21{},27{)}}},CellStyleChanges{{{1,1}{}}},CellOptionChanges{{{1,1}{}}},CellObjects{None,None},View{}],
SideBySide
]
​
Compare two lists, ignoring order and repetitions:
In[1]:=
Diff
RandomInteger[10,10],RandomSample[Range[10]],
DiffInputFunction
Union
Out[1]=
Wolfram`DiffTools`DiffObjectViewer[1,Wolfram`DiffTools`DiffObject[1,Lists,Changes{{1{0},0{}},{{2,1}{1,2}},{3{},3{3,4}},{{4,5}{5}},{4{},6{6,7,8,9}},{{5,10}{10}}},View{}],
Combined
]
​
Compare two strings as if they were lists of characters:
In[1]:=
Diff
"This is a test","This is another example",
DiffInputFunction
Characters
Out[1]=
Wolfram`DiffTools`DiffObjectViewer[1,Wolfram`DiffTools`DiffObject[1,Lists,Changes{{{1,1}{T,h,i,Wolfram`DiffTools`MoreMatches[3],s, ,a}},{10{ },10{n,o}},{{11,12}{t}},{11{},13{h}},{{12,14}{e}},{13{s,t},15{r, ,e,x,a,m,p,l,e}}},View{}],
Combined
]
SeeAlso
Diff
 
▪
DiffGranularity
 
▪
DiffView
TechNotes
▪
Introduction to DiffTools
RelatedGuides
▪
Diff Tools
""

© 2025 Wolfram. All rights reserved.

  • Legal & Privacy Policy
  • Contact Us
  • WolframAlpha.com
  • WolframCloud.com