Skip to content

float::from_str and NaN/inf/-inf #2165

Closed
@grahame

Description

@grahame

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.

Metadata

Metadata

Assignees

Labels

C-enhancementCategory: An issue proposing an enhancement or a PR with one.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions