strtof(), strtod(): handle NaN and Infinity
There was a TODO in the source for adding NaN and Inf parsing.
My solution is: after sign parsing, if the input string in lowercase starts with 'nan' respective 'inf', set result to corresponding constant from the underlying rust type
We seem to not have negative NaN support in rust. But I am not sure if that would be needed to satisfy the Standard; I don't think so.
Edited by Florian Meißner
Merge request reports
Activity
added 10 commits
-
80b725e7...fe02a5bd - 8 commits from branch
redox-os:master
- bccc50da - strtof(), strtod(): handle NaN and Infinity
- 9621f843 - fix endptr being parsed correctly by moving the following parsing into an if/else
-
80b725e7...fe02a5bd - 8 commits from branch
mentioned in commit ec1fb94f
Please register or sign in to reply