FLOATING NULL?
Henry Spencer
henry at zoo.toronto.edu
Wed May 29 01:36:55 AEST 1991
In article <13223 at uhccux.uhcc.Hawaii.Edu> karl at wiliki.UUCP (Karl Ihrig) writes:
>...blank spots in my real world data. I am totally baffled. How do I
>mark the float element of the array as null, blank, or not
>available?
There is no portable way except allocating a separate flag for each of
your float values. C does not guarantee the existence of any "blank" value
in floating point, and indeed a good many machines have no such special
value. If you are willing to constrain your code to run on machines using
IEEE floating point, you could use a NaN value... but there is no standard
way of generating such a value or testing for it.
--
"We're thinking about upgrading from | Henry Spencer @ U of Toronto Zoology
SunOS 4.1.1 to SunOS 3.5." | henry at zoo.toronto.edu utzoo!henry
More information about the Comp.lang.c
mailing list