Cleaned up code.
Cleaned up code.
Change if (singVals[i] >= max_small_singular_value) to:
       if (singVals[i] > max_small_singular_value).