Sujet : Re: Integral types and own type definitions (was Re: Suggested method for returning a string from a C program?)
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 26. Mar 2025, 01:16:31
Autres entêtes
Organisation : None to speak of
Message-ID : <87wmcc63z4.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
User-Agent : Gnus/5.13 (Gnus v5.13)
James Kuyper <
jameskuyper@alumni.caltech.edu> writes:
On 3/25/25 16:41, Keith Thompson wrote:
...
Real numbers and floating-point numbers have different meanings, both in
C and in general.
>
One of the key differences is that all floating point numbers are
rational (except for the special values that mean various kinds of
infinity, and NaNs). Real numbers include the rational numbers and the
irrational ones. Just to confuse the point, some languages use "REAL" to
declare floating point variables.
C defines a concept of "real types", which covers integer and floating
types (and excludes complex and imaginary types -- BTW imaginary types
are going away). C's real types are very different from mathematical
real numbers; all C real non-special values are mathematical rational
values. There are only finitely many values of real types in (any
implementation of) C.
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */