[ 
https://issues.apache.org/jira/browse/NUMBERS-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17343821#comment-17343821
 ] 

Matt Juntunen commented on NUMBERS-156:
---------------------------------------

For posterity, here is another accuracy test run, this time using the same 
inputs scaled to different exponent ranges, with the exception of the "full" 
input type. I also counted zero norms as failures and recorded the min and max 
ulp error.


||name||input type||error mean||error std dev||error min||error max||failed||
|direct|high|NaN|-0.00|Infinity|-Infinity|100000|
|enorm|high|0.0113|3.56e-05|-2.00|3.00|0|
|enormMod|high|-0.00219|0.00317|-2.00|2.00|0|
|direct|high-thresh|-0.00171|5.41e-06|-2.00|2.00|0|
|enorm|high-thresh|0.0117|0.00320|-2.00|3.00|0|
|enormMod|high-thresh|-0.00146|4.62e-06|-2.00|2.00|0|
|direct|mid|-0.00242|0.00317|-2.00|2.00|0|
|enorm|mid|-0.00242|0.00317|-2.00|2.00|0|
|enormMod|mid|-0.00242|0.00317|-2.00|2.00|0|
|direct|low-thresh|0.000140|0.00316|-2.00|2.00|0|
|enorm|low-thresh|0.0136|4.29e-05|-2.00|2.00|0|
|enormMod|low-thresh|0.000390|0.00316|-2.00|2.00|0|
|direct|low|1.83e+06|3.38e+06|-2.15e+09|2.15e+09|172|
|enorm|low|0.0107|3.39e-05|-2.00|2.00|0|
|enormMod|low|-0.00272|0.00317|-2.00|2.00|0|
|direct|full|-3.50e+04|117|-1.99e+09|4.03e+07|10110|
|enorm|full|0.0117|3.70e-05|-2.00|2.00|0|
|enormMod|full|2.00e-05|6.32e-08|-1.00|1.00|0|

For the "high-thresh" exponent range of 490-520, the direct and enormMod 
methods are very close. In this run, enormMod is more slightly accurate while 
in others the reverse is true. The url error min and max values seem very 
stable across runs, with the values above being typical.

 

> 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)

Reply via email to