|
|
The printf() family of functions prints NaNs or infinities. NaNs are printed with their diagnostic values.
Ideally, whatever printf() outputs, scanf() should be able to read using the same format. However, scanf() does not recognize NaNs and infinities for floating point formats. However, since these special cases serve mostly as diagnostics for erroneous floating point computation, outputting these cases was considered more important than being able to read them.