I'm writing a program that solves matrices by Gauss-Jordan method. Everything works except for -1.0/1.0. When printing the matrix, it prints out a 0.0 when it should still be -1.0. Can anyone explain why this is happening? In the case below, matrix[k][s] is -1.0 and the divisor is a 1.0 double value.

```
for(s = 0; s < (n+1); s++){ //Augmented matrix, while s < number of columns

                    if(divisor == 0.0){ //Not dividing by 0.0
                            continue;
                    }

                    matrix[k][s] = matrix[k][s] / divisor;

                    if((matrix[k][s] < TOLERANCE) || (matrix[k][s] < -TOLERANCE)){ //To avoid -0.0 values, TOLERANCE == 1e6
                            matrix[k][s] = 0.0;
                    }

```