DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Floating point operations

NaNs and infinities in input/output

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.


Previous topic: Compares and unordered condition

© 2003 Caldera International, Inc. All rights reserved.
SCO OpenServer Release 5.0.7 -- 11 February 2003