This is a precursor to #49 - as I started looking at the code to make sure aboutEqual and equalWithin had consistent behaviour I noticed that aboutEqual currently treats positive and negative infinity as equal! (Since isInfinite returns true for both.)
Fix comparison so that it does not treat positive infinity as equal to negative infinity
Add some tests to check this
For good measure, test to make sure comparisons against NaN also behave as expected (always return false)
Tweak test code style to use Float.Extra.aboutEqual qualified like everything else
This is a precursor to #49 - as I started looking at the code to make sure
aboutEqual
andequalWithin
had consistent behaviour I noticed thataboutEqual
currently treats positive and negative infinity as equal! (SinceisInfinite
returns true for both.)Float.Extra.aboutEqual
qualified like everything else