systemml-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Boehm <>
Subject Re: Numerical accuracy of DML.
Date Sat, 19 Aug 2017 07:14:19 GMT
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 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.


On Fri, Aug 18, 2017 at 11:39 PM, Janardhan Pulivarthi <> 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

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message