You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Baljit Singh (JIRA)" <ji...@apache.org> on 2019/04/10 21:50:00 UTC

[jira] [Created] (MATH-1480) Overflow in Vector norm and distance

Baljit Singh created MATH-1480:
----------------------------------

             Summary: Overflow in Vector norm and distance
                 Key: MATH-1480
                 URL: https://issues.apache.org/jira/browse/MATH-1480
             Project: Commons Math
          Issue Type: Bug
            Reporter: Baljit Singh


In Euclidean Vector classes (Vector2D, Vector3D), norm() and distance() rely on Math.sqrt(), which can overflow if the components of the vectors are large. Instead, they should rely on SafeNorm.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)