Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strtod reimplementation #69

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Strtod reimplementation #69

wants to merge 2 commits into from

Conversation

th-otto
Copy link
Contributor

@th-otto th-otto commented Jun 4, 2024

Not yet complete, but looks rather promising (seems to be have similar origin as the implementation in libcmini).

Already adjusted for mintlibs purpose (provides the _internal* functions needed by scanf()). Does hot handle group separators or locales yet (but that is also the case in current implementation).

Whats missing:

  • parsing of hex constants
  • parsing of strings "inf" and "nan"

Both should not be hard to implement.

What would regress: the algorithm does not parse strings that would result in denormals. There may also be differences in the least significant bit due to rounding.

The functions currently generate ~1K of code, including the tables, with only minimal references to libgcc.a for some float functions in the 68k version.

th-otto added 2 commits June 4, 2024 12:57
This does not need the gmp functions anymore, and compiles to
much smaller code
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.

1 participant