protected static int fixRoots ( float [ ] res , int rc ) { int tc = 0 ; for ( int i = 0 ; i < rc ; i ++ ) { out : { for ( int j = i + 1 ; j < rc ; j ++ ) { if ( isZero ( res [ i ] - res [ j ] ) ) { break out ; } } res [ tc ++ ] = res [ i ] ; } } return tc ; }
Excludes double roots . Roots are double if they lies enough close with each other .