This is from https://github.com/ThrowTheSwitch/Unity/commit/244edf6c1692515936cdb94c68c865299a896e09, an addition in v2.6.0.
Fix bug with infinity and NaN handling.