Skip to content

Handle infinity and NaN in printf

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