Should float::from_str do the following conversions? "NaN" -> float::NaN "inf" -> float::infinity "-inf" -> float::neg_infinity That'd match what float::to_str does (if my pull request #2164 is merged.) If this sounds good I'll chuck a patch in.