4 ms·
If someone is looking for some low hanging fruit in the way of contributing to cosmopolitan, they could teach its scanf()[1] family about floats[2]. (May not be
by smcameron 4y ago
If someone is looking for some low hanging fruit in the way of contributing to cosmopolitan, they could teach its scanf()[1] family about floats[2]. (May not be as low-hanging as it first appears though, as converting floats correctly is trickier than it might first appear to be. The comments in the code say it can do floats, but the comments are mistaken.)
[1] https://github.com/jart/cosmopolitan/blob/master/libc/fmt/vcscanf.c#L48 https://github.com/jart/cosmopolitan/blob/master/libc/fmt/vc...
[2] https://github.com/jart/cosmopolitan/issues/456 https://github.com/jart/cosmopolitan/issues/456
- jart 4y agoIt'd be really nice to have a good scanf() function. Worth noting that we do have Google's outstanding double-conversion library in the cosmo codebase https://github.com/jart/cosmopolitan/tree/master/third_party/double-conversion https://github.com/jart/cosmopolitan/tree/master/third_party... as well as gdtoa (which is what we use for printf's floating point support) https://github.com/jart/cosmopolitan/tree/master/third_party/gdtoa https://github.com/jart/cosmopolitan/tree/master/third_party... but we simply haven't found the time yet to incorporate this stuff into scanf() so contributions are very much welcome.