a^2+b^2+c^2-ab-bc-ac=0.5*(a^2-2ab+b^2 + b^2-2bc+c^2 + c^2-2ac+a^2 )
=0.5*( (a-b)^2 + (b-c)^2 + (c-a)^2 ) >= 0