You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Nietzsche (JIRA)" <ji...@apache.org> on 2019/07/02 20:33:00 UTC

[jira] [Created] (MATH-1493) Eigendecomposition Float comparison with ==; this is bad

Nietzsche created MATH-1493:
-------------------------------

             Summary: Eigendecomposition Float comparison with ==; this is bad
                 Key: MATH-1493
                 URL: https://issues.apache.org/jira/browse/MATH-1493
             Project: Commons Math
          Issue Type: Bug
    Affects Versions: 3.6.1
         Environment: I use very small and very big float numbers and number which are very near to 0.0 like -10^30;
so this effect me.
            Reporter: Nietzsche


If you compare two float numbers you should not use ==. I think this lead to some arithmetik mistakes. Maybe you should use epsilon comparison so not x == 0 but

x < 0.00000000000001

 

 

Effected methods:

findEigenVectors;

row 671

if (e[i + 1] == 0.0) {

row 687

if (t == 0.0 && i >= j) 

 

isNonSingular(); row 522

largestEigenvalueNorm == 0.0

 

 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)