Possible Duplicate:
NaN Literal in C?
I'm writing a function in ANSI C which receives two numbers as parameters. The parameters are of int
or float
type. The number may or may not be valid according to my filter. How do I return some value meaning failure? The return type is float
. The first thing that come to my mind was the NaN
abstract type. But I don't know how to represent it in ANSI C.
(sorry for my bad english. English isn't my native language)