Skip to content

Use standard library for float from_str_radix with radix 10#201

Merged
bors[bot] merged 2 commits into
rust-num:masterfrom
tspiteri:float-radix10
Mar 2, 2021
Merged

Use standard library for float from_str_radix with radix 10#201
bors[bot] merged 2 commits into
rust-num:masterfrom
tspiteri:float-radix10

Conversation

@tspiteri

@tspiteri tspiteri commented Feb 5, 2021

Copy link
Copy Markdown
Contributor

Fixes #198.

While at it, also make parsing of the "-NaN" string match the standard library.

@tspiteri

tspiteri commented Feb 5, 2021

Copy link
Copy Markdown
Contributor Author

#198 (comment) says "it would be nicer to improve this for all bases", but that is a lot of work with basically zero usefulness, which is the reason from_str_radix was removed from the standard library floating-point numbers.

@cuviper

cuviper commented Mar 1, 2021

Copy link
Copy Markdown
Member

Thanks!

@bors r+

@cuviper

cuviper commented Mar 1, 2021

Copy link
Copy Markdown
Member

bors r+

@bors

bors Bot commented Mar 2, 2021

Copy link
Copy Markdown
Contributor

@bors bors Bot merged commit 9c8f20e into rust-num:master Mar 2, 2021
@tspiteri tspiteri deleted the float-radix10 branch April 15, 2021 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rounding error with f64::from_str_radix

2 participants