[
https://issues.apache.org/jira/browse/GEOMETRY-50?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17146256#comment-17146256
]
Matt Juntunen commented on GEOMETRY-50:
---------------------------------------
bq. I would use Math.hypot over SafeNorm for 2D
Sounds good.
bq. What do you think to the idea of promoting the method to a public API in
Numbers given it is of wider scope than just complex numbers?
I think that's a great idea. In general, I think the functionality we're
discussing here is better placed in commons-numbers than in commons-geometry.
As for the issue of overflow in norm and distance computations, this can be
solved by using {{SafeNorm}} for the 3D norm computation and {{Math.hypot}} for
2D. We can continue with discussions of the accuracy and performance of these
computations in GEOMETRY-13 or, even better, another issue in commons-numbers.
I'm going to go ahead and make the change mentioned above and close this issue
for the beta release. Do we have an issue in NUMBERS for norm computations?
> Overflow in Vector norm and distance
> ------------------------------------
>
> Key: GEOMETRY-50
> URL: https://issues.apache.org/jira/browse/GEOMETRY-50
> Project: Apache Commons Geometry
> Issue Type: Bug
> Reporter: Baljit Singh
> Priority: Major
> Labels: beta1
>
> 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
(v8.3.4#803005)