Gilles Sadowski schrieb:
>>> L1 norm: equals(a, b, tolerance) = sum(abs(ab)) < tolerance
>>> L2 norm: equals(a, b, tolerance) = sqrt(sum((ab)^2)) < tolerance
>>> Linfinity norm: equals(a, b, tolerance) = max(abs(ab)) < tolerance
>>>
>>> All are useful.
>> I'll guess for 3D vector the L2norm is the more useful as it is
>> invariant when physical orthonormal frames are changed.
>> I'll check in the variant you prefer.
>
> [Cf. my other reply.]
> Should I still create an issue?
I'm currently not invovled in commonsmath, but I've written substatntial amount
of numeric software.
My thought on this point is, that it is generally more feasible to implement a
bunch on distance methods like
a.distance1(b) ... L1Norm
a.distance(b) ... L1Norm (this is usually what the user wants as default)
a.distanceInf(b) ... L∞Norm
and have the user decide on what is equal in his particular situation.
There is a very good article on ieee754 equality under
http://www.cygnussoftware.com/papers/comparingfloats/comparingfloats.htm
which contains an excessive discussion about various "equality" approaches.
IMHO it should be moreover considered to include the "AlomostEquals2sComplement"
method of this paper into commonsmath if not done so far.
Best regards,
Wolfgang

To unsubscribe, email: devunsubscribe@commons.apache.org
For additional commands, email: devhelp@commons.apache.org
