[ https://issues.apache.org/jira/browse/NUMBERS-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17340517#comment-17340517 ]
Matt Juntunen commented on NUMBERS-156: --------------------------------------- bq. I assume the ulp error for the unsafe method includes the cases where the result was not finite. Yes, I thought I had corrected that but I guess not. Here is a better run. ||name||ulp error||std dev||non-finite|| |exact|0.00|0.00|0 |unsafe|0.000313|1.05e-06|10534| |safe|0.0132|4.18e-05|0| |herbert|0.000130|4.11e-07|0| bq. I find it strange the unsafe method is slower. Huh? Direct computation ignoring overflow/underflow was the fastest in the benchmark. bq. Are you suggesting something like ... Yes, having a {{Norms}} class like that is what I was picturing. We don't necessarily need all of those methods, though. I currently only have a use case for the 3D euclidean norm and I think we should retain the array-based euclidean norm from {{SafeNorm}}. Besides those two methods, I thought it might be good to add other standard norms, even if they are trivial. bq. Is there a use case for a safe implementation of the p-norm? Not from me. I didn't know it existed until just now :-) bq. Shouldn't we rather opt for functional interfaces: Not sure what you mean. I don't want to have to instantiate an object to perform these computations. Also, the static methods could be used in a functional context as method references. > SafeNorm 3D overload > -------------------- > > Key: NUMBERS-156 > URL: https://issues.apache.org/jira/browse/NUMBERS-156 > Project: Commons Numbers > Issue Type: Improvement > Reporter: Matt Juntunen > Priority: Major > > We should create an overload of {{SafeNorm.value}} that accepts 3 arguments > to potentially improve performance for 3D vectors. -- This message was sent by Atlassian Jira (v8.3.4#803005)