Fixed bug when reading complex numbers where one part is NaN but the other is not.
Modified tests to work with real/complex numbers that have NaN part/s.