Make sure Inf/+Inf/-Inf/NaN work on all platforms.

atof doesn't cover these on at least Windows + MSVC.