Skip to content
Snippets Groups Projects

Handle infinity and NaN in printf

Merged Peter Limkilde Svendsen requested to merge plimkilde/relibc:printf-inf-nan into master

Based on my experience from !231, I found that printf's handling of infinity and NaN values was buggy. This MR should fix that.

For infinity, printf previously entered an infinite loop, while for NaN it printed "NaN". (The C standard specifies "nan" or "NAN", depending on the format string).

The test output is identical to that from glibc.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Loading
  • Loading
  • Loading
Please register or sign in to reply
Loading