diff --git a/maths/matrix.cpp b/maths/matrix.cpp index c64cb0b3..7af9e8b8 100644 --- a/maths/matrix.cpp +++ b/maths/matrix.cpp @@ -246,7 +246,8 @@ matrix::is_magic (void) const { double a = (*this)[i][j], b = (*this)[j][i]; - if (!exactly_zero (a) || !exactly_zero (b)) + if (!exactly_equal (static_cast (a), a) || + !exactly_equal (static_cast (b), b)) return false; if (!numbers.contains (a) ||