Thanks for the detailed explanation. I have found the following research "*Scalable and Numerically Stable Descriptive Statistics in SystemML*" to understand more about the implementation.
Yes, doing something like this will definitely cause a little trouble for the algorithms developer who works at the script level. Thank you, Janardhan On Sat, Aug 19, 2017 at 3:14 AM, Matthias Boehm <mboe...@googlemail.com> wrote: > Good question - let me separate the somewhat orthogonal aspects to it. > > First, for descriptive statistics such as sum, mean, skewness, or kurtosis, > we already use numerically stable implementations based on Kahan Plus (see > org.apache.sysml.runtime.functionobjects.KahanPlus if your interested). > However, for performance reasons, operations like matrix multiplication > rely on the basic multiply and adds (except for block aggregations of > distributed operations which also use KahanPlus). > > Second, for comparisons, we do simply rely on Java's builtin operators. > Once we extend the rather limited NaN support, we should change that to > Double.compare accordingly. However, both of these alternatives check for > exact matches. Hence, for comparisons of equivalence on script level, it's > usually a better idea to compare with a tolerance as follows: > abs(1-val)<10e-4 instead of val==1. Doing something like this inside the > builtin operations would probably create more problems and confusion than > it helps. > > Regards, > Matthias > > > On Fri, Aug 18, 2017 at 11:39 PM, Janardhan Pulivarthi < > janardhan.pulivar...@gmail.com> wrote: > > > Dear committers, > > > > May I know the numerical accuracy of dml at present, and are you planning > > to increase it. It seems for comparison operators we have depended upon > > java numerical floating point accuracy. > > > > Thank you very much, > > Janardhan > > >