NaN

From Free Pascal wiki
Revision as of 17:16, 6 August 2022 by Kai Burghardt (talk | contribs) (resolve Category: Pages using deprecated enclose attributes)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

English (en) suomi (fi) русский (ru)

NaN (not a number) is a numeric data type value representing an undefined or unrepresentable value. These values result from operations which have undefined numerical results. NaN is not the same as infinity.

1program NotANumber(input, output, stderr);
2begin
3	// writes 'Nan' (with spacing) on its own line
4	writeLn(0/0);
5end.

Note, NaN exists only in the context of floating point number calculations: 0 div 0 (integer division) is not allowed, though.

See also