[ https://issues.apache.org/jira/browse/NUMBERS-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17341499#comment-17341499 ]
Matt Juntunen commented on NUMBERS-156: --------------------------------------- bq. How are you generating the random vectors? Roughly what is the power of 2 exponent for each double, and the range of exponents over the numbers that are summed? I used a modified version of a random double generator from one of your performance tests. For the benchmark posted above, I used {{maxExp = +550}} and {{minExp = -550}}. {code:java} private double randomDouble() { // Create random doubles using random bits in the sign bit and the mantissa. final long mask = ((1L << 52) - 1) | 1L << 63; final long bits = rng.nextLong() & mask; // The exponent must be unsigned so + 1023 to the signed exponent final int expRange = Math.abs(maxExp - minExp); final long exp = rng.nextInt(expRange) + minExp + 1023; return Double.longBitsToDouble(bits | (exp << 52)); } {code} bq. I would favour the verbose manhatten, euclidian and maximum. Same here. I'll start working toward that. > 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)