[
https://issues.apache.org/jira/browse/NUMBERS-156?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17349729#comment-17349729
]
Matt Juntunen commented on NUMBERS-156:
---------------------------------------
Thanks, Alex. Here are the updated stats. The optimized linear method is
{{extLinearMod}}. I ended up changing the c1, c2, c3 assignments in
{{enormModExt}} from "=" to "+=".
||name||input type||error mean||error std dev||error min||error max||failed||
|direct|high|NaN|-0.00|Infinity|-Infinity|200000|
|enorm|high|-0.000235|1.11|-8.00|7.00|0|
|enormMod|high|-0.00128|1.02|-6.00|5.00|0|
|enormModKahan|high|0.000640|0.385|-1.00|1.00|0|
|enormModExt|high|0.00104|0.377|-1.00|1.00|0|
|extLinear|high|-0.000330|0.369|-1.00|1.00|0|
|extLinearMod|high|-0.000330|0.369|-1.00|1.00|0|
|direct|high-thresh|-0.00183|1.02|-5.00|5.00|0|
|enorm|high-thresh|-0.000785|1.11|-8.00|7.00|0|
|enormMod|high-thresh|-0.000505|0.798|-4.00|4.00|0|
|enormModKahan|high-thresh|0.000385|0.383|-1.00|1.00|0|
|enormModExt|high-thresh|0.000490|0.376|-1.00|1.00|0|
|extLinear|high-thresh|-0.000880|0.367|-1.00|1.00|0|
|extLinearMod|high-thresh|-0.000880|0.367|-1.00|1.00|0|
|direct|mid|-0.00269|1.03|-5.00|5.00|0|
|enorm|mid|-0.00269|1.03|-5.00|5.00|0|
|enormMod|mid|-0.00269|1.03|-5.00|5.00|0|
|enormModKahan|mid|-0.000770|0.392|-1.00|1.00|0|
|enormModExt|mid|-0.000370|0.385|-1.00|1.00|0|
|extLinear|mid|-0.00174|0.376|-1.00|1.00|0|
|extLinearMod|mid|-0.00174|0.376|-1.00|1.00|0|
|direct|low-thresh|-0.00127|1.02|-5.00|5.00|0|
|enorm|low-thresh|-0.000225|1.11|-8.00|7.00|0|
|enormMod|low-thresh|5.50e-05|0.798|-4.00|4.00|0|
|enormModKahan|low-thresh|0.000945|0.384|-1.00|1.00|0|
|enormModExt|low-thresh|0.00105|0.376|-1.00|1.00|0|
|extLinear|low-thresh|-0.000320|0.368|-1.00|1.00|0|
|extLinearMod|low-thresh|-0.000320|0.368|-1.00|1.00|0|
|direct|low|5.81e+04|1.89e+05|-2.62e+06|3.08e+06|0|
|enorm|low|0.000105|1.11|-8.00|7.00|0|
|enormMod|low|-0.000935|1.02|-6.00|5.00|0|
|enormModKahan|low|0.000980|0.384|-1.00|1.00|0|
|enormModExt|low|-0.000935|1.02|-6.00|5.00|0|
|extLinear|low|1.00e-05|0.368|-1.00|1.00|0|
|extLinearMod|low|1.00e-05|0.368|-1.00|1.00|0|
|direct|full|0.0175|0.496|-2.00|2.00|194102|
|enorm|full|0.0925|0.677|-3.00|3.00|0|
|enormMod|full|0.00768|0.496|-2.00|2.00|0|
|enormModKahan|full|-0.000640|0.479|-2.00|2.00|0|
|enormModExt|full|0.000570|0.469|-2.00|2.00|0|
|extLinear|full|0.00133|0.436|-1.00|1.00|2022|
|extLinearMod|full|0.00133|0.436|-1.00|1.00|2022|
!performance3-1-5.png!
!performance3-all.png!
{{extLinearMod}} has a little bit better performance but for some reason both
linear methods end up failing on some inputs on the full input range.
> 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
> Attachments: performance-all.png, performance-len-1-5.png,
> performance2-1-5.png, performance2-all.png, performance3-1-5.png,
> performance3-all.png
>
>
> 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)