Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get the Euclidean distance between two real vectors without using absolute value
ResourceFunction["RealEuclideanDistance"][u,v] gives the Euclidean distance between real vectors u and v without using Abs. |
Compute the real Euclidean distance between two points:
In[1]:= |
Out[1]= |
Compute in three dimensions:
In[2]:= |
Out[2]= |
Using numeric values:
In[3]:= |
Out[3]= |
EuclideanDistance adds Abs for variables and complicated expressions, making them more complicated. Often, that extra complication will make Simplify more difficult:
In[4]:= |
Out[4]= |
Compare with RealEuclideanDistance:
In[5]:= |
Out[5]= |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License