In an optimization program I pass around distance values quite often. In my case these are simple 2D Euclidean distances $\sqrt{\Delta x^2+\Delta y^2}$. Since I want to perform the square root calculation only at the end of all operations, I pass only squared distances $(\Delta x^2+\Delta y^2)$ around in the program.
Right now I'm using the variable name dist
for distances and dist2
for squared distances, where dist2
is intended to mean dist
$^2$.
Is this a mathematically good choice of naming, or is there a more commonly used name for this?
(Such as sqdist
? Or sed
= squared Euclidean distance? Or sos
= sum of squares?)