Skip to content

Use standard library for float from_str_radix with radix 10#201

Merged
bors[bot] merged 2 commits intorust-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 intorust-num:masterfrom
tspiteri:float-radix10

Conversation

@tspiteri
Copy link
Copy Markdown
Contributor

@tspiteri tspiteri commented Feb 5, 2021

Fixes #198.

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

@tspiteri
Copy link
Copy Markdown
Contributor Author

tspiteri commented Feb 5, 2021

#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
Copy link
Copy Markdown
Member

cuviper commented Mar 1, 2021

Thanks!

@bors r+

@cuviper
Copy link
Copy Markdown
Member

cuviper commented Mar 1, 2021

bors r+

@bors
Copy link
Copy Markdown
Contributor

bors bot commented Mar 2, 2021

@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