systemml-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Glenn Weidner (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (SYSTEMML-1816) toString can return -0
Date Sat, 09 Sep 2017 04:58:00 GMT

     [ https://issues.apache.org/jira/browse/SYSTEMML-1816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Glenn Weidner updated SYSTEMML-1816:
------------------------------------
    Fix Version/s:     (was: SystemML 1.0)
                   SystemML 0.15

> toString can return -0
> ----------------------
>
>                 Key: SYSTEMML-1816
>                 URL: https://issues.apache.org/jira/browse/SYSTEMML-1816
>             Project: SystemML
>          Issue Type: Bug
>          Components: Runtime
>            Reporter: Deron Eriksson
>            Assignee: Nakul Jindal
>             Fix For: SystemML 0.15
>
>
> When display matrix values with toString, -0 can be displayed.
> Example:
> {code}
> m = matrix("50 99 100 200",rows=2,cols=2);
> x = 100;
> m = (m - x) * ((m-x) >= 0)
> print(toString(m))
> {code}
> gives:
> {code}
> -0.000 -0.000
> 0.000 100.000
> {code}
> Using as.scalar on the individual cells returns 0:
> {code}
> for (i in 1:nrow(m)) {
>     for (j in 1:ncol(m)) {
>         n = m[i,j]
>         print('[' + i + ',' + j + ']:' + as.scalar(n))
>     }
> }
> {code}
> gives:
> {code}
> [1,1]:0.0
> [1,2]:0.0
> [2,1]:0.0
> [2,2]:100.0
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message