It is well-known that the area of a triangle can be computed from the squared edge lengths $a^2$, $b^2$, $c^2$ as $$ A = \frac{1}{4}\sqrt{2a^2b^2 + 2b^2c^2 + 2c^2a^2 - a^4 - b^4 - c^4}\\ = \frac{1}{4}\sqrt{(a^2 + b^2 + c^2)^2 - 2 (a^4 + b^4 + c^4)} $$ (See, e.g., here).
When computing the above expression numerically, the expression under the root can sometimes become negative (in the order of machine precision). One can of course ignore that and set those values to zero, but nevertheless the my question:
Is there an alternative expression for $A$ in terms of $a^2$, $b^2$, $c^2$ that is numerically positive, e.g., the sum of squares?
As shown in the link you posted about Heron's formula, the expression that you have under the root comes from: $(a+b+c) (b+c-a) (a+c-b) (a+b-c)$
You can't have a triangle where one of the edges is bigger than the sum of the other two, so your expression is always positive if a, b and c are the edges of a triangle.
You get negative values only when considering three segments that can't be put together to form a triangle.